Bug 99009

Summary: @SuppressWarnings tokens should not cover all possible warnings
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olivier Thomann CLA 2005-06-08 13:28:49 EDT
Right now, any warning handled by the compiler are supported.
Here is the list of the ones we should support using a better naming:

all : any warning
boxing : autoboxing conversion -----> boxing
dep-ann : missing @Deprecated annotation
deprecation : deprecation outside deprecated code
enumSwitch : incomplete enum switch ------> incomplete-switch
fieldHiding : field hiding another variable ------> hiding
finally : finally block not completing normally
indirectStatic : indirect reference to static member ------> static-access
localHiding : local variable hiding another variable ------> hiding
maskedCatchBlock : hidden catch block ------> hiding
nls : string literal lacking non-nls tag //$NON-NLS-<n>$ -----> nls
serial : missing serialVersionUID
unqualifiedField : unqualified reference to field ------>unqualified-field-access
unchecked : unchecked type operation
unusedArgument : unread method parameter ------> unused
unusedImport : unused import declaration ------> unused
unusedLocal : unread local variable ------> unused
unusedPrivate : unused private member declaration ------> unused
unusedThrown : unused declared thrown exception ------> unused
serial : missing serialVersionUID
staticReceiver : non-static reference to static member------> static-access
syntheticAccess : synthetic access for innerclass ------> synthetic-access
typeHiding : type parameter hiding another type ------> hiding
Comment 1 Olivier Thomann CLA 2005-06-08 14:17:32 EDT
Fixed and released in HEAD.
Update existing tests + added new check in
org.eclipse.jdt.core.tests.model.CodeCorrectionTests.testWarningTokens
Comment 2 Olivier Thomann CLA 2005-06-09 13:07:36 EDT
unusedImport : unused import declaration ------> unused
is removed since it is not possible to add a @SuppressWarnings for it.
Comment 3 David Audel CLA 2005-06-09 13:13:28 EDT
Verified for 3.1 RC2 using build N20050609-0010 + JDT/Core HEAD
Comment 4 David Audel CLA 2005-06-10 10:30:21 EDT
Verified for 3.1 RC2 using build I20050610-0010
Comment 5 Philipe Mulet CLA 2006-02-15 07:19:18 EST
Unused imports can now be addressed in 3.2 using @SuppressWarnings("unused"), also see bug 123522