Closed GoogleCodeExporter closed 9 years ago
One option might be to catch IAE in addition to UOE and fall back to the slower
behavior if either is thrown. Since we're only setting elements in the list
that are already in it, IAE would likely mean that duplicates were prohibited.
Original comment by cgdecker@google.com
on 3 Dec 2013 at 5:02
It looks like that would work for org.eclipse.emf.common.util.AbstractEList.
As an aside, looking through that class, it's violating the spec of List in its
add(E) method at least. It returns false from add if the object is a duplicate
and uniqueness is required, when it should throw IAE. List.add is specced to
return true always unless an exception is thrown.
Original comment by cgdecker@google.com
on 3 Dec 2013 at 5:09
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<issue id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:10
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:17
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:08
Original issue reported on code.google.com by
jens.von...@numberfour.eu
on 29 Nov 2013 at 3:56