Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332489

Summary: [quick assist] 'exchange left and right operands' for comparison operators changes semantics
Product: [Eclipse Project] JDT Reporter: Deepak Azad <deepakazad>
Component: UIAssignee: Deepak Azad <deepakazad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: 3.7 M5   
Hardware: All   
OS: All   
Whiteboard:

Description Deepak Azad CLA 2010-12-13 22:44:11 EST
Fix for Bug 149803 was not good.

The right fix should do the following
  if(a > b)  --> if(b < a)
  if(a >= b) --> if(b <= a)
  if(a < b)  --> if(b > a)
  if(a <= b) --> if(b >= a)
Comment 1 Deepak Azad CLA 2010-12-13 22:59:27 EST
Fixed in HEAD in AdvancedQuickAssistProcessor.
Comment 2 Dani Megert CLA 2010-12-14 03:18:37 EST
Please add some tests.
Comment 3 Deepak Azad CLA 2010-12-14 05:03:43 EST
Yeah, I had updated the tests in AdvancedQuickAssistTest.