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 - [GoogleMap] Incorrect constructor for GoogleMapResource
Summary: [GoogleMap] Incorrect constructor for GoogleMapResource
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-27 19:48 UTC by Lukas Jungmann
Modified: 2007-05-01 12:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
fix template (1.62 KB, patch)
2007-04-27 20:28 UTC, Nam Nguyen
Details | Diff
reviewed patch that also correct the duplicate encoding (2.93 KB, patch)
2007-04-27 22:34 UTC, Nam Nguyen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.