Summary: | [1.5] add a warning for 'enum' used as identifier | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Adam Kiezun <akiezun> |
Component: | Core | Assignee: | David Audel <david_audel> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | 3.1 M2 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Adam Kiezun
2004-06-10 11:56:59 EDT
that was actually planned for all new 1.5 keywords, in 1.5 branch. what are the other keywords? i thought it was just enum. Fixed and test added Compliance_1_3#test84() Compliance_1_4#test84() Compliance_1_5#test84() The new compiler option is * COMPILER / Reporting Usage of 'enum' Identifier * When enabled, the compiler will issue an error or a warning whenever 'enum' is * used as an identifier (reserved keyword in 1.5) * - option id: "org.eclipse.jdt.core.compiler.problem.enumIdentifier" * - possible values: { "error", "warning", "ignore" } * - default: "warning" And added a new constant to JavaCore JavaCore#COMPILER_PB_ENUM_IDENTIFIER Verified in I200409240100. Is it possible to turn this warning off? Look at 'Preferences>Java>Compiler>JDK Compliance'. Uncheck 'Use default compliance setting' and change the severity of 'Disallow identifiers caller 'enum''. |