8278937: JCK test for java_awt/geom/Line2D.Float fails after 8277868

Reviewed-by: jdv, kcr, rriggs
This commit is contained in:
Phil Race 2021-12-17 15:10:03 +00:00
parent a68f28cea6
commit e45e0b05b9
3 changed files with 20 additions and 3 deletions
src/java.desktop/share/classes
java/awt/geom
sun
awt/geom
java2d

@ -532,7 +532,7 @@ public abstract class Line2D implements Shape, Cloneable {
}
}
}
return java.lang.Double.compare(ccw, 0.0);
return (ccw < 0.0) ? -1 : ((ccw > 0.0) ? 1 : 0);
}
/**

@ -730,7 +730,13 @@ public abstract class Curve {
}
public static int orderof(double x1, double x2) {
return Double.compare(x1, x2);
if (x1 < x2) {
return -1;
}
if (x1 > x2) {
return 1;
}
return 0;
}
public static long signeddiffbits(double y1, double y2) {

@ -317,7 +317,18 @@ public class Spans {
*/
@Override
public int compareTo(Span otherSpan) {
return Float.compare(mStart, otherSpan.getStart());
float otherStart = otherSpan.getStart();
int result;
if (mStart < otherStart) {
result = -1;
} else if (mStart > otherStart) {
result = 1;
} else {
result = 0;
}
return result;
}
public String toString() {