Apache Lucene open-source search software
LUCENE-7955: GeoDegeneratePath did not compute endpoint bounding planes properly.
Karl Wrightc317ad8c1fb4
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoDegeneratePath.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoDegeneratePath.javaindex eaceb26b4b3..861a2d4b650 100644--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoDegeneratePath.java+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoDegeneratePath.java@@ -119,20 +119,20 @@ class GeoDegeneratePath extends GeoBasePath {if (i == 0) {// Starting endpointfinal SegmentEndpoint startEndpoint = new SegmentEndpoint(currentSegment.start,- new SidedPlane(currentSegment.startCutoffPlane));+ currentSegment.startCutoffPlane);endPoints.add(startEndpoint);this.edgePoints = new GeoPoint[]{currentSegment.start};continue;}endPoints.add(new SegmentEndpoint(currentSegment.start,- new SidedPlane(segments.get(i-1).endCutoffPlane),- new SidedPlane(currentSegment.startCutoffPlane)));+ segments.get(i-1).endCutoffPlane,+ currentSegment.startCutoffPlane));}// Do final endpointfinal PathSegment lastSegment = segments.get(segments.size()-1);endPoints.add(new SegmentEndpoint(lastSegment.end,- new SidedPlane(lastSegment.endCutoffPlane)));+ lastSegment.endCutoffPlane));}