You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2017/09/06 13:46:48 UTC

[05/50] lucene-solr:jira/solr-11285: LUCENE-7943: Disable an overly-aggressive assertion.

LUCENE-7943: Disable an overly-aggressive assertion.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/200beab0
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/200beab0
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/200beab0

Branch: refs/heads/jira/solr-11285
Commit: 200beab09ee68903e8511b2329f2cd54cf4de00a
Parents: 7281863
Author: Karl Wright <Da...@gmail.com>
Authored: Mon Aug 28 12:34:33 2017 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Mon Aug 28 12:34:33 2017 -0400

----------------------------------------------------------------------
 .../src/java/org/apache/lucene/spatial3d/geom/Plane.java         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/200beab0/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java
index 61bf0a9..c72c8c6 100755
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java
@@ -2373,7 +2373,9 @@ public class Plane extends Vector {
     if (!evaluateIsZero(startPoint)) {
       throw new IllegalArgumentException("Start point is not on plane");
     }
-    assert Math.abs(x*x + y*y + z*z - 1.0) < MINIMUM_RESOLUTION_SQUARED : "Plane needs to be normalized";
+    
+    // The following assertion fails at times even for planes that were *explicitly* normalized, so I've disabled the check.
+    //assert Math.abs(x*x + y*y + z*z - 1.0) < MINIMUM_RESOLUTION_SQUARED : "Plane needs to be normalized";
     
     // The first step is to rotate coordinates for the point so that the plane lies on the x-y plane.
     // To acheive this, there will need to be three rotations: