Fix for failing BasePolygonBuilder

This commit is contained in:
Colin Goodheart-Smithe 2014-08-12 11:04:07 +01:00
parent 128b83e4a5
commit 371d6021e7
1 changed files with 1 additions and 1 deletions

View File

@ -359,7 +359,7 @@ public abstract class BasePolygonBuilder<E extends BasePolygonBuilder<E>> 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);