Skip to content

Commit c171c80

Browse files
committed
don't use Integer.compare for backward compatibility
1 parent c885e79 commit c171c80

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/esri/core/geometry/Simplificator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,8 +1002,9 @@ int _compareVerticesSimple(int v1, int v2) {
10021002
m_shape.getXY(v2, pt2);
10031003
int res = pt1.compare(pt2);
10041004
if (res == 0) {// sort equal vertices by the path ID
1005-
res = Integer.compare(m_shape.getPathFromVertex(v1),
1006-
m_shape.getPathFromVertex(v2));
1005+
int i1 = m_shape.getPathFromVertex(v1);
1006+
int i2 = m_shape.getPathFromVertex(v2);
1007+
res = i1 < i2 ? -1 : (i1 == i2 ? 0 : 1);
10071008
}
10081009

10091010
return res;

0 commit comments

Comments
 (0)