please review 7117612: warnings fixes in java.lang

Omair Majid omajid at redhat.com
Mon Dec 5 16:14:24 UTC 2011


On 12/05/2011 01:35 AM, Stuart Marks wrote:
> Whoops, good catch. Those changes are indeed not permitted. We'll have
> to use @SuppressWarnings("rawtypes") or some such instead.
>

Thanks for the comments. I have an updated webrev available at: 
http://cr.openjdk.java.net/~omajid/webrevs/warnings-day-2011/02/

Changes:

AutoClosable.java
  - Removed @SuppressWarnings("try")

CharacterName.java
  - @SuppressWarnings has a smaller scope in CharacterName.java

EnumConstantsNotPresentException.java
  - Use @SuppressWarnings("rawtypes") instead of Enum<?>

src/windows/classes/java/lang/ProcessEnvironment.java:
  - Added a serialVersionUID. Unfortunately, I don't have a windows box 
so I cant identify the previous serialVersionUID value for this class. 
Can someone with a windows build handy help me out?
  - Added 2 SuppressWarnings.

Thanks,
Omair

> On 12/4/11 6:04 PM, David Holmes wrote:
>> Are the signature changes in
>>
>> src/share/classes/java/lang/EnumConstantNotPresentException.java
>>
>> permitted?
>>
>> Otherwise looks okay to me.
>>
>> David
>>
>> On 5/12/2011 11:02 AM, 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.
>>>
>>> Thanks,
>>>
>>> s'marks




More information about the core-libs-dev mailing list