about SuppressWarnings

Alan Bateman Alan.Bateman at oracle.com
Sun Nov 4 14:28:32 UTC 2012


On 04/11/2012 13:19, fuyou wrote:
> hi
>    all
>     When I use @SuppressWarnings in program.
>    I only know some  ,ex
>   @SuppressWarnings("unchecked"), at SuppressWarnings("unused").
>    what others?
>
The JLS specifies two warning names [2], beyond that it is compiler 
specific. In the case of javac then you use "java -X" and it output will 
include possible values for -Xlint that are the warning names you can 
use with @SupressWarnings.

-Alan

[1] http://docs.oracle.com/javase/specs/jls/se7/html/jls-9.html#jls-9.6.3.5



More information about the core-libs-dev mailing list