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 209391 - Should not use java.net.URL as a key to HashMap
Summary: Should not use java.net.URL as a key to HashMap
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Inspection (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Jan Stola
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2012-03-09 17:16 UTC by Petr Jiricka
Modified: 2012-03-12 16:10 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2012-03-09 17:16:38 UTC
o.n.m.extbrowser.plugins.ExternalBrowserPlugin uses HashMap awatingBrowserResponse with URL as the key. This should not be done for performance reasons, see http://blog.markfeeney.com/2010/11/java-uri-vs-url.html and numerous other blogs on this topic.
Comment 1 Petr Jiricka 2012-03-09 17:32:46 UTC
Also there is a typo: awatingBrowserResponse -> awaitingBrowserResponse
Comment 2 Petr Jiricka 2012-03-12 10:45:57 UTC
Cc'ing also David as he apparently wrote this code.
Comment 3 Jan Stola 2012-03-12 14:28:28 UTC
Fixed by
http://hg.netbeans.org/web-main/rev/dae4c1ecf30c (typo)
http://hg.netbeans.org/web-main/rev/ef09b37ed6c3 (URL replaced by String)
Comment 4 David Konecny 2012-03-12 16:10:56 UTC
Thanks.