This is an automated email from the ASF dual-hosted git repository.

sanjaydutt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 62cef8ee255 FloatingPointLiteralPrecision from errorProne task
62cef8ee255 is described below

commit 62cef8ee25551bddbf7f5faca424805a7c1e5354
Author: Sanjay Dutt <[email protected]>
AuthorDate: Fri Aug 30 12:10:34 2024 +0530

    FloatingPointLiteralPrecision from errorProne task
---
 .../src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java     | 4 ++--
 .../apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java   | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java 
b/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java
index 5a4ff489d12..7b7cfd74dc3 100644
--- a/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java
+++ b/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java
@@ -266,7 +266,7 @@ public class TestLegacyNumericUtils extends SolrTestCase {
         new float[] {
           Float.NEGATIVE_INFINITY,
           -2.3E25f,
-          -9.9999999E+14f,
+          -1.0E+15f,
           -1.0f,
           -1.0E-1f,
           -1.0E-2f,
@@ -275,7 +275,7 @@ public class TestLegacyNumericUtils extends SolrTestCase {
           1.0E-2f,
           1.0E-1f,
           1.0f,
-          9.9999999E+14f,
+          1.0E+15f,
           2.3E25f,
           Float.POSITIVE_INFINITY,
           Float.NaN
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java
index a802e266900..1e51f1c9550 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java
@@ -200,7 +200,7 @@ public class AddEvaluatorTest extends SolrTestCase {
     values.put("d", 123456789123456789L);
     result = evaluator.evaluate(new Tuple(values));
     assertTrue(result instanceof Double);
-    assertEquals(4 * 123456789123456784D, (Double) result, 0);
+    assertEquals(4 * 1.2345678912345678E+17, (Double) result, 0);
   }
 
   @Test
@@ -251,7 +251,7 @@ public class AddEvaluatorTest extends SolrTestCase {
     values.put("d", 123456789123456789L);
     result = evaluator.evaluate(new Tuple(values));
     assertTrue(result instanceof Double);
-    assertEquals(6 * 123456789123456784D, (Double) result, 0);
+    assertEquals(6 * 1.2345678912345678E+17, (Double) result, 0);
 
     values.clear();
     values.put("a", 4.12345678);
@@ -311,7 +311,7 @@ public class AddEvaluatorTest extends SolrTestCase {
     values.put("d", 123456789123456789L);
     result = evaluator.evaluate(new Tuple(values));
     assertTrue(result instanceof Double);
-    assertEquals(4 * 123456789123456784D, (Double) result, 0);
+    assertEquals(4 * 1.2345678912345678E+17, (Double) result, 0);
 
     values.clear();
     values.put("a", -4.12345678);

Reply via email to