-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
5.0
-
x86
-
windows_2000
FULL PRODUCT VERSION :
jdk 1.5.0_06
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
The Constructor Area(Shape s) does not create the appropriate curve objects for the source code attached below.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
see source code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Code returns false
ACTUAL -
Code returns true
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
final Polygon polygon_1 = new Polygon();
polygon_1.addPoint(1, 1);
polygon_1.addPoint(2, 2);
polygon_1.addPoint(3, 3);
final Polygon polygon_2 = new Polygon();
polygon_2.addPoint(1, 1);
polygon_2.addPoint(4, 4);
polygon_2.addPoint(3, 3);
final Area area_1 = new Area(polygon_1);
final Area area_2 = new Area(polygon_2);
System.out.println(area_2.equals(area_1));
---------- END SOURCE ----------
jdk 1.5.0_06
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
The Constructor Area(Shape s) does not create the appropriate curve objects for the source code attached below.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
see source code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Code returns false
ACTUAL -
Code returns true
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
final Polygon polygon_1 = new Polygon();
polygon_1.addPoint(1, 1);
polygon_1.addPoint(2, 2);
polygon_1.addPoint(3, 3);
final Polygon polygon_2 = new Polygon();
polygon_2.addPoint(1, 1);
polygon_2.addPoint(4, 4);
polygon_2.addPoint(3, 3);
final Area area_1 = new Area(polygon_1);
final Area area_2 = new Area(polygon_2);
System.out.println(area_2.equals(area_1));
---------- END SOURCE ----------
- duplicates
-
JDK-5008338 Area class comments need to explain the use and caveats of the class better
-
- Resolved
-