Hi,

On 12/04/2011 08: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.

http://cr.openjdk.java.net/~omajid/webrevs/warnings-day-2011/01/

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.

AutoCloseable.java --

java/lang/AutoCloseable.java:34: 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?

CharacterName.java --

Consider narrowing the scope of @SuppressWarnings by using a local
variable.


I have posted a new webrev:
http://cr.openjdk.java.net/~omajid/webrevs/warnings-day-2011/03/

This includes all the changes from the feedback so far, as well as changes to ThreadLocal.

I will not be posting a patch for ClassValue since (as you kindly pointed out), others are making changes to it and removing some warnings too [1]. I suppose I will revisit it later (if warning fixes are still being accepted :D ).

Thanks,
Omair

[1] http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-December/008541.html

Reply via email to