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 - Warn about adding a to a collection
Summary: Warn about adding a to a collection
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2008-03-14 05:15 UTC by _ tboudreau
Modified: 2013-09-02 14:19 UTC (History)
0 users

See Also:
Exception Reporter:


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