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

Bug 227977

Summary: PrecisionPoint should override Point.equals
Product: [Tools] GEF Reporter: Stéphane Lizeray <lizeray>
Component: GEF-Legacy Draw2dAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse, nyssen, romain.raugi
Version: 3.3.2   
Target Milestone: 3.4.1 (Ganymede SR1)   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Fix for Europa, for PrecisionPoint and PrecisionDimension.
none
Fix for Ganymede, for PrecisionPoint and PrecisionDimension. nyssen: iplog+

Description Stéphane Lizeray CLA 2008-04-21 06:05:53 EDT
Build ID: M20071023-1652

Steps To Reproduce:
   PrecisionPoint p1 = new PrecisionPoint(0.1,0.1);
   PrecisionPoint p2 = new PrecisionPoint(0.2,0.2);
   System.err.println(p1.equals(p2));
It prints out true !!

More information:
Have a look at PrecisionRectangle.equals, it overrides Rectangle.equals.

Just do the same.
Comment 1 Romain Raugi CLA 2008-08-08 10:12:33 EDT
Created attachment 109522 [details]
Fix for Europa, for PrecisionPoint and PrecisionDimension.
Comment 2 Romain Raugi CLA 2008-08-08 10:13:16 EDT
Created attachment 109524 [details]
Fix for Ganymede, for PrecisionPoint and PrecisionDimension.
Comment 3 Anthony Hunter CLA 2008-08-08 11:06:26 EDT
Added a JUnit test to demonstrate the error in PrecisionPoint and PrecisionDimension. Committed the patch to R4_3_maintenance and HEAD (Europa is closed).