You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kw...@apache.org on 2017/08/28 16:37:35 UTC
lucene-solr:branch_7x: LUCENE-7943: Disable an overly-aggressive
assertion.
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x 7a9870e3f -> 3343b5c50
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/3343b5c5
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3343b5c5
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3343b5c5
Branch: refs/heads/branch_7x
Commit: 3343b5c50369ec9d4ed30db3647f569abe4001a9
Parents: 7a9870e
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:37:29 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/3343b5c5/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: