8028564: Concurrent calls to CHM.put can fail to add the key/value to the map

Doug Lea dl at cs.oswego.edu
Thu Dec 5 20:29:31 UTC 2013


On 12/05/2013 03:18 PM, Brent Christian wrote:
> I'm curious about why this was done:
>
> *** 4452,4462 ****
>            public final boolean removeAll(Collection<?> c) {
> !             Objects.requireNonNull(c);
>                boolean modified = false;
> --- 4495,4505 ----
>            public final boolean removeAll(Collection<?> c) {
> !             if (c == null) throw new NullPointerException();
>                boolean modified = false;

It wasn't actually done. In part as a way to keep base jsr166
sources for CHM and most other existing classes as JDK7-compatible
as possible, the jsr166 versions always use the explicit form.
For this update, the Oracle-initiated changes that hadn't been in
jsr166 versions don't appear.

-Doug






More information about the core-libs-dev mailing list