JDK RFR of 6556996: (ann spec) SuppressWarnings strings should be documented

Joe Darcy joe.darcy at oracle.com
Sat Feb 23 20:24:39 UTC 2013


On 2/23/2013 1:25 AM, Remi Forax wrote:
> On 02/22/2013 02:46 AM, Joe Darcy wrote:
>> Hello,
>>
>> Please review the simple fix below for
>>
>>     6556996: (ann spec) SuppressWarnings strings should be documented
>>     http://bugs.sun.com/view_bug.do?bug_id=6556996
>>
>> the webrev is at
>>
>>     http://cr.openjdk.java.net/~darcy/6556996.0/
>>
>> and the patch is below. In brief, the only required string to be 
>> recognized in the SuppressWarnings annotation is "unchecked", which 
>> has been required by the JLS since Java SE 5. I made that adjustment 
>> to the documentation of the SuppressWarnings type. In addition, I 
>> added more @jls links relating the documentation of various 
>> annotation type to the JLS sections which discuss them.
>>
>> Thanks,
>>
>> -Joe
>
> Like the original submitter of the bug, I think that several other 
> strings (at least rawtypes, varargs, deprecation, serial) should be 
> documented with an explicit comment saying that they are not part of 
> the specification.
> Those flags are way too common to not be documented in the API.
>

The only value mandated by the specification, the JLS in this case, is 
"unchecked" -- that will now be mentioned after this is pushed. javac 
and ecj have a somewhat differing set of recognized strings which should 
be documented in those tools.

-Joe




More information about the core-libs-dev mailing list