This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 253736

Summary: Variable in JavaScript method recognized as global
Product: javascript Reporter: Eccenux
Component: EditorAssignee: Petr Pisl <ppisl>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description Eccenux 2015-07-24 12:29:25 UTC
In the first assignment to `address.baseUrl` in below code Netbeans recognizes `address` as a global variable. Don't know what is going on here as `address.id` assignment line is fine for Netbeans.

```
function GlobalUriHelper(myPattern) {
	var _self = this;
	this.parse = function (systemUri) {
		var address = {baseUrl:'', id:0};
		systemUri.replace(myPattern, function(a, protocol, server, id) {
			address.baseUrl = protocol + server;
			address.id = parseInt(id);
		});
		return address;
	};
}
```
Comment 1 Petr Pisl 2015-07-29 08:16:12 UTC
This is fixed in NB 8.1.
Comment 2 Quality Engineering 2015-07-30 01:25:15 UTC
Integrated into 'main-silver', will be available in build *201507300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8afd734b53ee
User: Petr Pisl <ppisl@netbeans.org>
Log: #253736 - Variable in JavaScript method recognized as global