Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3507F200CDB for ; Sat, 5 Aug 2017 16:59:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 338DA16534E; Sat, 5 Aug 2017 14:59:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7745716534B for ; Sat, 5 Aug 2017 16:59:49 +0200 (CEST) Received: (qmail 15336 invoked by uid 500); 5 Aug 2017 14:59:43 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 15314 invoked by uid 99); 5 Aug 2017 14:59:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Aug 2017 14:59:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D8A29E2F41; Sat, 5 Aug 2017 14:59:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sarowe@apache.org To: commits@lucene.apache.org Date: Sat, 05 Aug 2017 14:59:44 -0000 Message-Id: <0024a45981814bd0a2d0f22c07a8c679@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/3] lucene-solr:branch_7_0: SOLR-10796: TestPointFields.testDoublePointFieldRangeFacet(): Guard against converting a double-valued '-Infinity' to BigDecimal archived-at: Sat, 05 Aug 2017 14:59:50 -0000 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/ec99019b Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ec99019b Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ec99019b Branch: refs/heads/branch_7_0 Commit: ec99019b3660cacdb10bb8f81923ad4111f99d7e Parents: c58bbaa Author: Steve Rowe Authored: Sat Aug 5 10:59:11 2017 -0400 Committer: Steve Rowe Committed: Sat Aug 5 10:59:32 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/ec99019b/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);