From 371d6021e7e381cc7d26261d74a4dcc25d37d9a8 Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Tue, 12 Aug 2014 11:04:07 +0100 Subject: [PATCH] Fix for failing BasePolygonBuilder --- .../elasticsearch/common/geo/builders/BasePolygonBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/common/geo/builders/BasePolygonBuilder.java b/src/main/java/org/elasticsearch/common/geo/builders/BasePolygonBuilder.java index 778dc409788..628252b9bd5 100644 --- a/src/main/java/org/elasticsearch/common/geo/builders/BasePolygonBuilder.java +++ b/src/main/java/org/elasticsearch/common/geo/builders/BasePolygonBuilder.java @@ -359,7 +359,7 @@ public abstract class BasePolygonBuilder> extend current.intersect = current.coordinate; final int intersections = intersections(current.coordinate.x, edges); final int pos = Arrays.binarySearch(edges, 0, intersections, current, INTERSECTION_ORDER); - if (pos < 0) { + if (pos >= 0) { throw new ElasticsearchParseException("Invaild shape: Hole is not within polygon"); } final int index = -(pos+2);