You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/02/11 07:10:12 UTC

[GitHub] [lucene-solr] iverase commented on a change in pull request #1249: LUCENE-9217: Add validation to XYGeometries

iverase commented on a change in pull request #1249: LUCENE-9217: Add validation to XYGeometries
URL: https://github.com/apache/lucene-solr/pull/1249#discussion_r377470379
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/geo/XYRectangle.java
 ##########
 @@ -29,12 +31,16 @@
 
   /** Constructs a bounding box by first validating the provided x and y coordinates */
   public XYRectangle(double minX, double maxX, double minY, double maxY) {
-    this.minX = minX;
-    this.maxX = maxX;
-    this.minY = minY;
-    this.maxY = maxY;
-    assert minX <= maxX;
-    assert minY <= maxY;
+    if (minX > maxX) {
 
 Review comment:
   I wonder if a XYRectangle should be initialise with floats instead of doubles like the other XYGeometries?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org