Bug 238226 - [preferences] Surface new compiler warning option in preference page
Summary: [preferences] Surface new compiler warning option in preference page
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M1   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-24 07:22 EDT by Philipe Mulet CLA
Modified: 2008-07-16 05:39 EDT (History)
3 users (show)

See Also:


Attachments
patch (5.88 KB, patch)
2008-06-24 11:25 EDT, Benjamin Muskalla CLA
daniel_megert: iplog+
Details | Diff
mylyn/context/zip (162.39 KB, application/octet-stream)
2008-06-24 11:25 EDT, Benjamin Muskalla CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2008-06-24 07:22:19 EDT
3.5 stream

Follow up for bug 115814. 
Pref label could be: "Comparing identical" and should be categorized amongst potential programming problems.
Comment 1 Philipe Mulet CLA 2008-06-24 07:24:26 EDT
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"
Comment 2 Benjamin Muskalla CLA 2008-06-24 11:25:21 EDT
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
Comment 3 Benjamin Muskalla CLA 2008-06-24 11:25:29 EDT
Created attachment 105720 [details]
mylyn/context/zip
Comment 4 Martin Aeschlimann CLA 2008-06-27 06:37:17 EDT
patch released > 20080627

Note: I improved the label to 
'Comparing identical values ('x == x'):'