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 102822

Summary: [GoogleMap] Incorrect constructor for GoogleMapResource
Product: webservices Reporter: Lukas Jungmann <jungi>
Component: RESTAssignee: Nam Nguyen <nnguyen>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: fix template
reviewed patch that also correct the duplicate encoding

Description Lukas Jungmann 2007-04-27 19:48:32 UTC
The constructor for GoogleMapResource is:

       key = key;
       proxy = proxy;

but it should be:

       this.key = key;
       this.proxy = proxy;

It is missing "this".
Comment 1 Nam Nguyen 2007-04-27 20:28:50 UTC
Created attachment 41881 [details]
fix template
Comment 2 Lukas Jungmann 2007-04-27 20:47:59 UTC
applied patch to own sources and v. in trunk. Just don't forget to put it to
both places (trunk + release60-m9 branch).

Just nitpicking: the proxy field declaration 'static String proxy = ""' or
'static String proxy = null;' would be better then current 'static String proxy
= "myproxy.mydomain.com:8080";' in the template.

Thanks.
Comment 3 Nam Nguyen 2007-04-27 21:13:57 UTC
Right. Actually I notice that the static usage here is inconsistence with the
passing in value from constructor.  The minimal fix is to make them non-static
at this time.

After J1, we might want to make them static and remove constructor initialization.
Comment 4 Lukas Jungmann 2007-04-27 21:36:28 UTC
OK, let's do that within issue 102837. Thanks
Comment 5 Nam Nguyen 2007-04-27 22:34:50 UTC
Created attachment 41892 [details]
reviewed patch that also correct the duplicate encoding
Comment 6 Lukas Jungmann 2007-04-27 23:07:19 UTC
Yes, this looks and works much better. Feel free to merge into m9 branch :)

Thanks.
Comment 7 Nam Nguyen 2007-04-27 23:36:45 UTC
Checked into trunk:

/cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/codegen/resources/GoogleMapResource.template,v
 <--  GoogleMapResource.template
new revision: 1.7; previous revision: 1.6
/cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/actions/UseGeoCodeAction.java,v
 <--  UseGeoCodeAction.java
new revision: 1.7; previous revision: 1.6
Comment 8 Nam Nguyen 2007-04-27 23:43:37 UTC
Also commit to release60-m9 branch:

/cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/codegen/resources/GoogleMapResource.template,v
 <--  GoogleMapResource.template
new revision: 1.5.2.1; previous revision: 1.5
/cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/actions/UseGeoCodeAction.java,v
 <--  UseGeoCodeAction.java
new revision: 1.6.2.1; previous revision: 1.6
Comment 9 Lukas Jungmann 2007-05-01 12:41:21 UTC
v.