lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject [27/50] [abbrv] lucene-solr:feature/autoscaling: SOLR-10796: TestPointFields.testDoublePointFieldRangeFacet(): Guard against converting a double-valued '-Infinity' to BigDecimal
Date Tue, 08 Aug 2017 12:14:40 GMT
SOLR-10796: TestPointFields.testDoublePointFieldRangeFacet(): Guard against converting a double-valued
'-Infinity' to BigDecimal


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

Branch: refs/heads/feature/autoscaling
Commit: cff5e985835759b4fcb64629ddca817fa6e17944
Parents: 3f9e748
Author: Steve Rowe <sarowe@apache.org>
Authored: Sat Aug 5 10:59:11 2017 -0400
Committer: Steve Rowe <sarowe@apache.org>
Committed: Sat Aug 5 10:59:11 2017 -0400

----------------------------------------------------------------------
 solr/core/src/test/org/apache/solr/schema/TestPointFields.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cff5e985/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
index 8192406..5a89e78 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
@@ -615,7 +615,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
       max = sortedValues.get(sortedValues.size() - 1);
       buffer = BigDecimal.valueOf(max).subtract(BigDecimal.valueOf(min))
           .divide(BigDecimal.valueOf(numValues / 2), RoundingMode.HALF_UP).doubleValue();
-      gap = BigDecimal.valueOf(max + buffer).subtract(BigDecimal.valueOf(min - buffer))
+      gap = BigDecimal.valueOf(max).subtract(BigDecimal.valueOf(min)).add(BigDecimal.valueOf(buffer
* 2.0D))
           .divide(BigDecimal.valueOf(numBuckets), RoundingMode.HALF_UP).doubleValue();
     } while (max >= Double.MAX_VALUE - buffer || min <= -Double.MAX_VALUE + buffer);
     // System.err.println("min: " + min + "   max: " + max + "   gap: " + gap + "   buffer:
" + buffer);


Mime
View raw message