Community
Participate
Working Groups
3.5 stream Follow up for bug 115814. Pref label could be: "Comparing identical" and should be categorized amongst potential programming problems.
Summary: Added a new compiler warning to detect comparisons between identical expressions. This diagnosis is controlled by option: JavaCore.COMPILER_PB_COMPARING_IDENTICAL and produces a problem marker which ID is IProblem.ComparingIdentical problem ID. Compiler option ID: Reporting Comparison of Identical Expressions. When enabled, the compiler will issue an error or a warning if a comparison is involving identical operands (e.g 'x == x'). - Option id:"org.eclipse.jdt.core.compiler.problem.comparingIdentical" - Possible values: { "error", "warning", "ignore" } - Default: "warning"
Created attachment 105719 [details] patch Here is a patch which adds the new compile warning as preference to the preference/property pages. Also added a section to the documentation
Created attachment 105720 [details] mylyn/context/zip
patch released > 20080627 Note: I improved the label to 'Comparing identical values ('x == x'):'