Summary: | Provide a @SuppressWarnings pragma for "Comparing identical expressions" compiler warning | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Kostya Vasilyev <kman> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED WONTFIX | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | markus.kell.r, Olivier_Thomann, satyam.kandula |
Version: | 3.7 | ||
Target Milestone: | 3.7 M6 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Whiteboard: |
Description
Kostya Vasilyev
2011-01-25 15:21:58 EST
I'm not sure it's really worth adding a special token for that. Note that if you compile with ... public static final int which = BUILD_CONFIG_PRODUCTION; you'd two new warnings: - unused @SuppressWarnings("identical-expression") - the "// blah blah blah" block is dead code A better solution would be to just initialize the "which" like this: public static final int which; static { which= BUILD_CONFIG_INTERNAL_DEBUG; } That avoids all these problems. For the final production build, you can of course still initialize the constant directly. Agreed. Closing as WONTFIX. Verified for 3.7M6 |