Skip to content

Commit

Permalink
fix extent assertions
Browse files Browse the repository at this point in the history
these Extent assertions were breaking tests where rectangles
that crossed the dateline were added. These assertions are
not required within the Extent logic since it is prepared
for bounding boxes that span the dateline
  • Loading branch information
talevy committed Dec 11, 2019
1 parent 1648e29 commit cd77db6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions server/src/main/java/org/elasticsearch/common/geo/Extent.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
* Object representing the extent of a geometry object within a {@link ShapeTreeWriter}.
*/
public class Extent implements Writeable {
static final int WRITEABLE_SIZE_IN_BYTES = 24;

public int top;
public int bottom;
public int negLeft;
Expand Down Expand Up @@ -79,8 +77,6 @@ public void reset(int top, int bottom, int negLeft, int negRight, int posLeft, i
* @param topRightY the top-right y-coordinate
*/
public void addRectangle(int bottomLeftX, int bottomLeftY, int topRightX, int topRightY) {
assert bottomLeftX <= topRightX;
assert bottomLeftY <= topRightY;
this.bottom = Math.min(this.bottom, bottomLeftY);
this.top = Math.max(this.top, topRightY);
if (bottomLeftX < 0 && topRightX < 0) {
Expand Down

0 comments on commit cd77db6

Please sign in to comment.