Bug 212884

Summary: [1.5][compiler] SuppressWarnings'"unused" still complain if warning is not enabled
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann, satyam.kandula
Version: 3.4   
Target Milestone: 3.8 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Frederic Fusier CLA 2007-12-13 09:58:54 EST
Build I20071212-1800.

While debugging test case for dom bug 212857, I saw that the SuppressWarning("unused") was flagged as unnecessary when the corresponding compiler option "Parameter is never read" is not set.

A more simple test case still shows this issue:

public class X {
        void m(@SuppressWarnings("unused") int arg) {
        }
}
Comment 1 Philipe Mulet CLA 2007-12-13 12:14:50 EST
There seems to remain some issues in cases the warning token corresponds to a family of irritants... for instance "unused" denotes unused arguments, variables etc... which means it is quite hard to tell.

Comment 2 Olivier Thomann CLA 2011-08-18 14:42:48 EDT
It behaves as expected. @SuppressWarnings("unused") is not used if the warning option unusedArgument is not set.
This is unrelated to the fact that the warning token unused covers the warning for unusedArgument.
By default, unusedArgument is not set.
Closing as INVALID.
Comment 3 Satyam Kandula CLA 2011-09-12 10:29:12 EDT
This is consistent with other errors too.
Verified for 3.8M2