You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/08/08 12:14:49 UTC
[36/50] [abbrv] lucene-solr:feature/autoscaling: SOLR-10796:
TestPointFields.testDoublePointFieldRangeFacet(): Guard against converting a
double-valued '-Infinity' to BigDecimal (fix location #2)
SOLR-10796: TestPointFields.testDoublePointFieldRangeFacet(): Guard against converting a double-valued '-Infinity' to BigDecimal (fix location #2)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/5f307653
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/5f307653
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/5f307653
Branch: refs/heads/feature/autoscaling
Commit: 5f30765331fe05a8394266081f041a1831e7adf1
Parents: e053e22
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Aug 7 00:59:46 2017 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Aug 7 01:00:18 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/5f307653/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 5a89e78..5d2adb4 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
@@ -746,7 +746,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
max = sortedValues.get(sortedValues.size() - 1).val;
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);