JDK 8 Code Review Request for 5029031 (coll) Collections.checkedQueue(Queue<T>, Class) is missing

Sebastian Sickelmann sebastian.sickelmann at gmx.de
Sat Oct 1 06:25:22 UTC 2011


Am 30.09.2011 22:20, schrieb Darryl Mocek:
> Hello.
>
> Please review this patch to add CheckedQueue to Collections.  Test 
> case provided.
>
> Webrev at: http://cr.openjdk.java.net/~mduigou/4533691/0/webrev/
>
> Thanks,
> Darryl
Looks good to me.
Just the @since 1.7 seems wrong for an JDK8 Patch. Should there be a 
backport to jdk7 of this?

Here are some additional ideas:

Should we use diamonds in testcases too? L71,85,108,125,157

What's about moving

public boolean equals(Object o) {return o == this || c.equals(o);}

to CheckedCollection and remove it in CheckedSet (L2394), CheckedList (L2506)

and

public int hashCode()           {return c.hashCode();}

to CheckedCollection and remove it in CheckedSet (L2395)


This additional change doesn't look to big for me. But unfortunatly i 
can't read the bugdetails of 5029031.

Should we do more deduplication in Collections like the above, in 
another CR?
Then i would send a Code Review Request for this. Is there someone who 
would sponsor it?

-- Sebastian



More information about the core-libs-dev mailing list