please review 7117612: warnings fixes in java.lang

Joe Darcy joe.darcy at
Mon Dec 5 17:17:55 UTC 2011

On 12/4/2011 5:02 PM, Stuart Marks wrote:
> Please review the following webrev submitted by Omair Majid, 
> consisting of warnings fixes for a variety of files in java.lang.
> It looks pretty clean, but it would be good to get another pair of 
> eyes on this since there is sometimes great subtlety in java.lang.
> My comments below.
> --
>     java/lang/ warning: [try] auto-closeable
>     resource AutoCloseable has a member method close() that could
>     throw InterruptedException
> The warning here is kind of silly. The intent is to warn implementors 
> of AutoCloseable not to throw InterruptedException. But this is an 
> interface, not an implementation, and it's the AutoCloseable interface 
> itself! We may want to rethink when the compiler emits this warning, 
> instead of suppressing the warning in source code. Joe, what do you 
> think about this?

Yes, I think the better technical approach is to have javac check to see 
if its compiling AutoCloseable.


More information about the core-libs-dev mailing list