From a03c0b806db0c6cd54fcf03abfc0ff86ffb944f1 Mon Sep 17 00:00:00 2001 From: Karl Wright Date: Mon, 11 Apr 2016 12:55:21 -0400 Subject: [PATCH] LUCENE-7201: Handle illegal rectangles during testing. --- .../test/org/apache/lucene/spatial3d/TestGeo3DPoint.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java index 20302b40864..deb35878c01 100644 --- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java +++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java @@ -560,7 +560,11 @@ public class TestGeo3DPoint extends LuceneTestCase { case 2: { // Rectangles final Rectangle r = GeoTestUtil.nextBox(); - return Geo3DPoint.newBoxQuery(field, r.minLat, r.maxLat, r.minLon, r.maxLon); + try { + return Geo3DPoint.newBoxQuery(field, r.minLat, r.maxLat, r.minLon, r.maxLon); + } catch (IllegalArgumentException e) { + continue; + } } case 3: {