diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 7de2179817d0..bf74298891eb 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -80,6 +80,8 @@ Bug Fixes * GITHUB#12220: Hunspell: disallow hidden title-case entries from compound middle/end +* GITHUB#12287: Fix a bug in ShapeTestUtil. (Heemin Kim) + Other --------------------- diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/geo/ShapeTestUtil.java b/lucene/test-framework/src/java/org/apache/lucene/tests/geo/ShapeTestUtil.java index e0e8c6964fce..aed0a92ea4ca 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/tests/geo/ShapeTestUtil.java +++ b/lucene/test-framework/src/java/org/apache/lucene/tests/geo/ShapeTestUtil.java @@ -99,10 +99,10 @@ private static XYPolygon trianglePolygon(XYRectangle box) { final float[] polyY = new float[4]; polyX[0] = box.minX; polyY[0] = box.minY; - polyX[1] = box.minX; + polyX[1] = box.maxX; polyY[1] = box.minY; - polyX[2] = box.minX; - polyY[2] = box.minY; + polyX[2] = box.maxX; + polyY[2] = box.maxY; polyX[3] = box.minX; polyY[3] = box.minY; return new XYPolygon(polyX, polyY); @@ -142,12 +142,12 @@ private static XYPolygon boxPolygon(XYRectangle box) { final float[] polyY = new float[5]; polyX[0] = box.minX; polyY[0] = box.minY; - polyX[1] = box.minX; + polyX[1] = box.maxX; polyY[1] = box.minY; - polyX[2] = box.minX; - polyY[2] = box.minY; + polyX[2] = box.maxX; + polyY[2] = box.maxY; polyX[3] = box.minX; - polyY[3] = box.minY; + polyY[3] = box.maxY; polyX[4] = box.minX; polyY[4] = box.minY; return new XYPolygon(polyX, polyY);