Bug 212884 - [1.5][compiler] SuppressWarnings'"unused" still complain if warning is not enabled
Summary: [1.5][compiler] SuppressWarnings'"unused" still complain if warning is not en...
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.8 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-13 09:58 EST by Frederic Fusier CLA
Modified: 2011-09-12 10:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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