Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 207746

Summary: Leverage new compiler option: org.eclipse.jdt.core.compiler.problem.unusedWarningToken
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: martinae, philippe_mulet
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Philipe Mulet CLA 2007-10-29 06:08:44 EDT
JDT/Core just released (for 3.4M3) a new compiler option to improve handling of @SuppressWarnings annotation.

(from JDT/Core buildnotes)
Added new compiler optional warning for diagnosing unnecessary @SuppressWarnings annotation. This is mostly helpful to get rid of @SupressWarnings(...) annotations which were necessary a while ago, but are no longer useful. Note that @SuppressWarnings("all") is still silencing the warning for unnecessary @SuppressWarnings, as it is the master switch to silence ALL warnings. Also added option: JavaCore.COMPILER_PB_UNUSED_WARNING_TOKEN and problem ID IProblem.UnusedWarningToken. 
* COMPILER / Reporting Unnecessary @SuppressWarnings
*    When enabled, the compiler will issue an error or a warning when encountering @SuppressWarnings annotation 
*    for which no corresponding warning got detected in the code. This diagnostic is provided to help developers to get
*    rid of transient @SuppressWarnings no longer needed. Note that @SuppressWarnings("all") is still 
*    silencing the warning for unnecessary @SuppressWarnings, as it is the master switch to silence ALL warnings.
*     - option id:         "org.eclipse.jdt.core.compiler.problem.unusedWarningToken"
*     - possible values:   { "error", "warning", "ignore" }
*     - default:           "warning"
Comment 1 Philipe Mulet CLA 2007-10-29 06:09:21 EDT
1. Need an entry in the preferences page
2. Maybe need a cleanup as well ?
Comment 2 Martin Aeschlimann CLA 2007-10-29 06:12:11 EDT

*** This bug has been marked as a duplicate of bug 127533 ***
Comment 3 Martin Aeschlimann CLA 2007-10-29 06:36:57 EDT
uups, wrong bug
Comment 4 Martin Aeschlimann CLA 2007-10-29 06:37:11 EDT

*** This bug has been marked as a duplicate of bug 207701 ***