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 130113

Summary: Warn about adding a java.net.URL to a collection
Product: java Reporter: _ tboudreau <tboudreau>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description _ tboudreau 2008-03-14 05:15:57 UTC
A couple of times I have seen people have a the same performance problem - they use URL objects as model objects and add them to a HashSet or similar - 
they don't realize that URL.equals() will make a socket connection to try to determine if two URL objects point to the same IP address.

It seems like a common enough and non-obvious bug that it would be nice if we showed an error mark and a warning if a java.net.URL or subclass is added to 
a java.util.Collection, java.util.Map or subclass thereof.
Comment 1 Jan Becicka 2008-05-15 13:18:57 UTC
Max volunteered :)