Bug 276740 - comparing identical value detection does not work for primitive types
Summary: comparing identical value detection does not work for primitive types
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M1   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-18 12:00 EDT by Dani Megert CLA
Modified: 2009-08-04 08:32 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch + tests (9.80 KB, patch)
2009-05-25 07:47 EDT, Srikanth Sankaran CLA
no flags Details | Diff
Revised patch (10.96 KB, patch)
2009-05-25 08:03 EDT, Srikanth Sankaran CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2009-05-18 12:00:24 EDT
I20090515-1143.

Comparing identical value detection does not work for primitive types, e.g.

if (1 == 1)
   ...

is not warned.
Comment 1 Srikanth Sankaran CLA 2009-05-19 03:03:06 EDT
Will investigate this.
Comment 2 Srikanth Sankaran CLA 2009-05-25 07:47:14 EDT
Created attachment 136996 [details]
Proposed patch + tests

This patch also includes the fix and tests for bug# 276741
Comment 3 Srikanth Sankaran CLA 2009-05-25 08:03:50 EDT
Created attachment 136998 [details]
Revised patch

Previous patch by mistake did not include one java file.
Comment 4 Srikanth Sankaran CLA 2009-06-17 02:43:59 EDT
Fix & tests released for 3.6M1
Comment 5 Frederic Fusier CLA 2009-08-04 08:32:03 EDT
Verified for 3.6M1 using build 20090802-2000.