reRFR: 4802647 : NullPointerException not thrown by AbstractCollection.retainAll/removeAll

Martin Buchholz martinrb at
Mon May 6 23:34:03 UTC 2013

I recall considering whether to fix this "bug" myself many years ago.  I
decided that the value was so low (throw the "required" NPE when this
collection is empty and the argument collection is null) that users who
where not ultra-pedantic (or tck testers) would prefer the legacy behavior.
 And I would make the same decision today.  But it's hard to really object
to something that appears to make the implementation a bit more compliant
with the spec.

On Mon, May 6, 2013 at 3:03 PM, Mike Duigou <mike.duigou at> wrote:

> Hello all;
> Long, long ago, Brandon Passanisi proposed a fix to correct non-conformant
> implementation of retainAll/removeAll(). It was reviewed but was never
> committed to TL repo (it got lost amidst Christmas vacation and other
> matters). Rather than surprise everyone with a rogue changeset they may
> have forgotten I'm reposting the review webrev and giving everyone a chance
> to change their mind.
> Hearing no objections I will push this in about 24 hours.
> Mike

More information about the core-libs-dev mailing list