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.
100331. List<Whatever> l = ...; l.remove(0); // delete first element => "Given object cannot contain instances of int (expected Whatever)" which is nonsense since this method overload is remove(int), not remove(Object).
Example in maven/src/org/netbeans/modules/maven/ActionProviderImpl.java: if (maps.getActions().size() > 10) { maps.getActions().remove(0); }
*** Bug 192791 has been marked as a duplicate of this bug. ***
It doesn't happen with List<String> list = null; list.remove(0); (any more?), but it happens with e.g. List<String> list = null; list.subList(0, 0).remove(0);
http://hg.netbeans.org/jet-main/rev/001b95f5d29d
Integrated into 'main-golden', will be available in build *201012090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/001b95f5d29d User: Jan Lahoda <jlahoda@netbeans.org> Log: #183367: $l{java.util.Collection}.remove($o{java.lang.Object}) should not match l.subList(0, 0).remove(0).