RFR 7118066: Warnings in java.util.concurrent package

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Dec 5 17:54:19 UTC 2011


On 05/12/11 15:36, Chris Hegarty wrote:
>
> Cleanup warnings in the j.u.c. package.
>
> This is a sync up with the warning fixes in Doug's CVS. There are also 
> a few style cleanups, import fixes, trivial local variable renaming, 
> typos, etc. But nothing too surprising!
>
> http://cr.openjdk.java.net/~chegar/7118066/webrev.00/webrev/
>
> -Chris.
>
> P.S. I have already reviewed this, and the contribution is of course 
> from Doug.
Nice work! Some comments below:

*) ArrayBlockingQueue: would it make sense to change the declared type 
of 'items' to be E[] instead of Object[] ? This will create one 
unchecked warnings for sure (when the variable is initialized) - but all 
remaining unchecked cast can go away.

*) SynchronousQueue: it seems that if the class SNode was generified, it 
would be possible to get rid of the warnings in the 'transfer' method 
without adding a global @SuppressWarnings.

Maurizio



More information about the core-libs-dev mailing list