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

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new 24aed4585 Fix tests
24aed4585 is described below

commit 24aed45851dec4e2cb241f8a684379f934622143
Author: Gary Gregory <[email protected]>
AuthorDate: Sun May 10 08:53:32 2026 -0400

    Fix tests
---
 .../java/org/apache/commons/lang3/math/NumberUtilsTest.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
index 02b955473..8d7136260 100644
--- a/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
@@ -1058,8 +1058,8 @@ void testIsParsableFullWidthUnicodeJDK8326627() {
     void testIsParsableInfinity() {
         // sanity checks
         final String s = "Infinity";
-        assertEquals(Double.NaN, Double.parseDouble(s));
-        assertEquals(Float.NaN, Float.parseFloat(s));
+        assertEquals(Double.POSITIVE_INFINITY, Double.parseDouble(s));
+        assertEquals(Float.POSITIVE_INFINITY, Float.parseFloat(s));
         // isParsable
         assertTrue(NumberUtils.isParsable(s));
     }
@@ -1068,8 +1068,8 @@ void testIsParsableInfinity() {
     void testIsParsableInfinityNegative() {
         // sanity checks
         final String s = "-Infinity";
-        assertEquals(Double.NaN, Double.parseDouble(s));
-        assertEquals(Float.NaN, Float.parseFloat(s));
+        assertEquals(Double.NEGATIVE_INFINITY, Double.parseDouble(s));
+        assertEquals(Float.NEGATIVE_INFINITY, Float.parseFloat(s));
         // isParsable
         assertTrue(NumberUtils.isParsable(s));
     }
@@ -1078,8 +1078,8 @@ void testIsParsableInfinityNegative() {
     void testIsParsableInfinityPositive() {
         // sanity checks
         final String s = "+Infinity";
-        assertEquals(Double.NaN, Double.parseDouble(s));
-        assertEquals(Float.NaN, Float.parseFloat(s));
+        assertEquals(Double.POSITIVE_INFINITY, Double.parseDouble(s));
+        assertEquals(Float.POSITIVE_INFINITY, Float.parseFloat(s));
         // isParsable
         assertTrue(NumberUtils.isParsable(s));
     }

Reply via email to