You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/12/19 23:49:08 UTC

(commons-lang) branch master updated (c9c55d443 -> 1c05980f3)

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

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


    from c9c55d443 Bump minor version
     new 8d36f424d JavaVersion.get(String) now support Java 26 and 27
     new 07bcc200a Tests now traverse Locales deterministically
     new f2c35205e Javadoc
     new 472cb8294 Javadoc
     new 3d576e2e0 Rename internal constant
     new 2aad1143a Javadoc
     new fd154dec9 Add JavaVersion.JAVA_27
     new 1c05980f3 Make test Java15BugFastDateParserTest more lenient on Java 26-ea

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/changes/changes.xml                            |  1 +
 .../java/org/apache/commons/lang3/JavaVersion.java | 26 ++++----
 .../java/org/apache/commons/lang3/SystemUtils.java |  9 ++-
 .../org/apache/commons/lang3/JavaVersionTest.java  |  4 +-
 .../org/apache/commons/lang3/LocaleProblems.java   | 75 ++++++++++++++++++++++
 .../commons/lang3/time/FastDateParserTest.java     | 11 ++--
 .../lang3/time/Java15BugFastDateParserTest.java    | 28 +++++---
 7 files changed, 125 insertions(+), 29 deletions(-)
 create mode 100644 src/test/java/org/apache/commons/lang3/LocaleProblems.java


(commons-lang) 03/08: Javadoc

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f2c35205efb15a4cf73ce65dc57fcea2acbe948a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 19 17:36:29 2025 -0500

    Javadoc
---
 src/main/java/org/apache/commons/lang3/SystemUtils.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java
index 4f911b641..deb1c1c0f 100644
--- a/src/main/java/org/apache/commons/lang3/SystemUtils.java
+++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java
@@ -380,6 +380,9 @@ public class SystemUtils {
      */
     public static final String JAVA_SPECIFICATION_VERSION = SystemProperties.getJavaSpecificationVersion();
 
+    /**
+     * A constant for the Java version, may be null
+     */
     private static final JavaVersion JAVA_SPECIFICATION_VERSION_AS_ENUM = JavaVersion.get(JAVA_SPECIFICATION_VERSION);
 
     /**


(commons-lang) 01/08: JavaVersion.get(String) now support Java 26 and 27

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8d36f424d02a687d915ec591e40978d36d61d6b4
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 19 17:32:11 2025 -0500

    JavaVersion.get(String) now support Java 26 and 27
---
 src/changes/changes.xml                                 | 1 +
 src/main/java/org/apache/commons/lang3/JavaVersion.java | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d977190f0..7389a3f5b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -88,6 +88,7 @@ The <action> type attribute can be add,update,fix,remove.
     <!-- ADD -->
     <action                   type="add" dev="ggregory" due-to="Gary Gregory">Add JavaVersion.JAVA_27.</action>
     <action                   type="add" dev="ggregory" due-to="Gary Gregory">Add SystemUtils.IS_JAVA_27.</action>
+    <action                   type="add" dev="ggregory" due-to="Gary Gregory">JavaVersion.get(String) now support Java 26 and 27.</action>
     <!-- UPDATE -->
     <action                   type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">Bump org.apache.commons:commons-parent from 92 to 93 #1498.</action>
     <action                   type="update" dev="ggregory" due-to="Gary Gregory">[test] Bump org.apache.commons:commons-text from 1.14.0 to 1.15.0.</action>
diff --git a/src/main/java/org/apache/commons/lang3/JavaVersion.java b/src/main/java/org/apache/commons/lang3/JavaVersion.java
index f147dd30f..b0e15bfca 100644
--- a/src/main/java/org/apache/commons/lang3/JavaVersion.java
+++ b/src/main/java/org/apache/commons/lang3/JavaVersion.java
@@ -280,6 +280,10 @@ static JavaVersion get(final String versionStr) {
             return JAVA_24;
         case "25":
             return JAVA_25;
+        case "26":
+            return JAVA_26;
+        case "27":
+            return JAVA_27;
         default:
             final float v = toFloatVersion(versionStr);
             if (v - 1. < 1.) { // then we need to check decimals > .9


(commons-lang) 07/08: Add JavaVersion.JAVA_27

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fd154dec975049e4dd22126194518245f4935692
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 19 17:58:14 2025 -0500

    Add JavaVersion.JAVA_27
    
    - Add SystemUtils.IS_JAVA_27
    - Available now: OpenJDK JDK 27 Early-Access Builds
---
 src/test/java/org/apache/commons/lang3/JavaVersionTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/lang3/JavaVersionTest.java b/src/test/java/org/apache/commons/lang3/JavaVersionTest.java
index 2c1769840..e60e091d9 100644
--- a/src/test/java/org/apache/commons/lang3/JavaVersionTest.java
+++ b/src/test/java/org/apache/commons/lang3/JavaVersionTest.java
@@ -67,11 +67,13 @@ void testGetJavaVersion() throws Exception {
         assertEquals(JavaVersion.JAVA_23, JavaVersion.get("23"));
         assertEquals(JavaVersion.JAVA_24, JavaVersion.get("24"));
         assertEquals(JavaVersion.JAVA_25, JavaVersion.get("25"));
+        assertEquals(JavaVersion.JAVA_26, JavaVersion.get("26"));
+        assertEquals(JavaVersion.JAVA_27, JavaVersion.get("27"));
         // Failures
         assertEquals(JavaVersion.JAVA_RECENT, JavaVersion.get("1.10"), "1.10 failed");
         // assertNull("2.10 unexpectedly worked", JavaVersion.get("2.10"));
         assertEquals(JavaVersion.get("1.5"), JavaVersion.getJavaVersion("1.5"), "Wrapper method failed");
-        assertEquals(JavaVersion.JAVA_RECENT, JavaVersion.get("26"), "Unhandled"); // LANG-1384
+        assertEquals(JavaVersion.JAVA_RECENT, JavaVersion.get("99"), "Unhandled"); // LANG-1384
     }
 
     @Test


(commons-lang) 08/08: Make test Java15BugFastDateParserTest more lenient on Java 26-ea

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1c05980f3d73efa1829b00f54b87eae520e65097
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 19 18:49:01 2025 -0500

    Make test Java15BugFastDateParserTest more lenient on Java 26-ea
---
 .../java/org/apache/commons/lang3/SystemUtils.java |  2 +-
 .../org/apache/commons/lang3/LocaleProblems.java   | 75 ++++++++++++++++++++++
 .../commons/lang3/time/FastDateParserTest.java     | 11 ++--
 .../lang3/time/Java15BugFastDateParserTest.java    | 23 ++++---
 4 files changed, 98 insertions(+), 13 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java
index 074384145..519a5560a 100644
--- a/src/main/java/org/apache/commons/lang3/SystemUtils.java
+++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java
@@ -383,7 +383,7 @@ public class SystemUtils {
     /**
      * A constant for the Java version, may be null.
      */
-    private static final JavaVersion JAVA_SPECIFICATION_VERSION_ENUM = JavaVersion.get(JAVA_SPECIFICATION_VERSION);
+    static final JavaVersion JAVA_SPECIFICATION_VERSION_ENUM = JavaVersion.get(JAVA_SPECIFICATION_VERSION);
 
     /**
      * A constant for the System Property {@code java.util.prefs.PreferencesFactory}. A class name.
diff --git a/src/test/java/org/apache/commons/lang3/LocaleProblems.java b/src/test/java/org/apache/commons/lang3/LocaleProblems.java
new file mode 100644
index 000000000..1c73211f5
--- /dev/null
+++ b/src/test/java/org/apache/commons/lang3/LocaleProblems.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.lang3;
+
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
+
+import java.text.ParseException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * Offers tests a way to skip problematic Locales with a JUnit assumption.
+ */
+public class LocaleProblems {
+
+    // needs a better name.
+    private static final Map<JavaVersion, List<String>> UNSUPPORTED_CAT_A;
+    static {
+        UNSUPPORTED_CAT_A = new HashMap<>();
+        // "cv_RU" is a problem on Java version: 26-beta, vendor: Eclipse Adoptium, runtime: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/26.0.0-ea.27.0.ea/x64
+        // Same for "cv"
+        UNSUPPORTED_CAT_A.put(JavaVersion.JAVA_26, Arrays.asList("cv", "cv_RU"));
+    }
+
+    // needs a better name.
+    private static final Map<JavaVersion, List<String>> UNSUPPORTED_CAT_B;
+    static {
+        UNSUPPORTED_CAT_B = new HashMap<>();
+        // "cv_RU_#Cyrl" is a problem on Java version: 26-beta, vendor: Eclipse Adoptium, runtime: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/26.0.0-ea.27.0.ea/x64
+        UNSUPPORTED_CAT_B.put(JavaVersion.JAVA_26, Arrays.asList("cv", "cv_RU", "cv_RU_#Cyrl"));
+    }
+
+    private static void assumeLocaleSupported(final Locale locale, final Map<JavaVersion, List<String>> unsupportedCatA, final ParseException e) {
+        final boolean supported = isSupported(locale, unsupportedCatA);
+        if (!supported) {
+            System.out.printf("Failing test assumption for locale '%s' on Java version %s.%n", locale, SystemUtils.JAVA_SPECIFICATION_VERSION_ENUM);
+            if (e != null) {
+                // Not the whole stack trace, just the exception message.
+                System.out.printf("\t%s%n", e);
+            }
+        }
+        assumeTrue(supported);
+    }
+
+    public static void assumeLocaleSupportedA(final Locale locale) {
+        assumeLocaleSupported(locale, UNSUPPORTED_CAT_A, null);
+    }
+
+    public static void assumeLocaleSupportedB(final Locale locale, final ParseException e) {
+        assumeLocaleSupported(locale, UNSUPPORTED_CAT_B, e);
+    }
+
+    private static boolean isSupported(final Locale locale, final Map<JavaVersion, List<String>> unsupported) {
+        final List<String> list = unsupported.get(SystemUtils.JAVA_SPECIFICATION_VERSION_ENUM);
+        return list == null || !list.contains(locale.toString());
+    }
+}
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
index 3c6ecf011..c8b9099a2 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
@@ -39,6 +39,7 @@
 import java.util.stream.Stream;
 
 import org.apache.commons.lang3.AbstractLangTest;
+import org.apache.commons.lang3.LocaleProblems;
 import org.apache.commons.lang3.LocaleUtils;
 import org.apache.commons.lang3.SerializationUtils;
 import org.apache.commons.lang3.SystemUtils;
@@ -55,6 +56,7 @@
 import org.junitpioneer.jupiter.ReadsDefaultTimeZone;
 import org.junitpioneer.jupiter.cartesian.ArgumentSets;
 import org.junitpioneer.jupiter.cartesian.CartesianTest;
+import org.opentest4j.AssertionFailedError;
 
 /**
  * Tests {@link org.apache.commons.lang3.time.FastDateParser}.
@@ -724,7 +726,7 @@ void testTzParses(final Locale locale) throws Exception {
     }
 
     private void validateSdfFormatFdpParseEquality(final String formatStr, final Locale locale, final TimeZone timeZone,
-        final FastDateParser dateParser, final Date inDate, final int year, final Date csDate) throws ParseException {
+        final FastDateParser fastDateParser, final Date inDate, final int year, final Date csDate) throws ParseException {
         final SimpleDateFormat sdf = new SimpleDateFormat(formatStr, locale);
         sdf.setTimeZone(timeZone);
         if (formatStr.equals(SHORT_FORMAT)) {
@@ -734,13 +736,14 @@ private void validateSdfFormatFdpParseEquality(final String formatStr, final Loc
 //        System.out.printf("[Java %s] Date: '%s' formatted with '%s' -> '%s'%n", SystemUtils.JAVA_RUNTIME_VERSION, inDate,
 //            formatStr, fmt);
         try {
-            final Date out = dateParser.parse(fmt);
+            final Date out = fastDateParser.parse(fmt);
             assertEquals(inDate, out, "format: '" + formatStr + "', locale: '" + locale + "', time zone: '"
                 + timeZone.getID() + "', year: " + year + ", parse: '" + fmt);
-        } catch (final ParseException pe) {
+        } catch (final ParseException e) {
+            LocaleProblems.assumeLocaleSupportedB(locale, e);
             if (year >= 1868 || !locale.getCountry().equals("JP")) {
                 // LANG-978
-                throw pe;
+                throw new AssertionFailedError("locale " + locale, e);
             }
         }
     }
diff --git a/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java b/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java
index ce4986d54..f89860be2 100644
--- a/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java
@@ -25,6 +25,7 @@
 import java.util.TimeZone;
 
 import org.apache.commons.lang3.AbstractLangTest;
+import org.apache.commons.lang3.LocaleProblems;
 import org.apache.commons.lang3.LocaleUtils;
 import org.apache.commons.lang3.function.TriFunction;
 import org.junit.jupiter.api.Test;
@@ -65,6 +66,19 @@ void testJava15BuggyLocaleTestAll(final Locale locale) throws ParseException {
         testSingleLocale(locale);
     }
 
+    private void testLocale(final TriFunction<String, TimeZone, Locale, DateParser> dbProvider, final String format, final boolean eraBC, final Calendar cal,
+            final Locale locale) {
+        LocaleProblems.assumeLocaleSupportedA(locale);
+        // ja_JP_JP cannot handle dates before 1868 properly
+        if (eraBC && locale.equals(FastDateParser.JAPANESE_IMPERIAL)) {
+            return;
+        }
+        final SimpleDateFormat sdf = new SimpleDateFormat(format, locale);
+        final DateParser fdf = dbProvider.apply(format, TimeZone.getDefault(), locale);
+        // If parsing fails, a ParseException will be thrown and the test will fail
+        FastDateParserTest.checkParse(locale, cal, sdf, fdf);
+    }
+
     private void testLocales(final TriFunction<String, TimeZone, Locale, DateParser> dbProvider, final String format,
             final boolean eraBC) throws Exception {
         final Calendar cal = Calendar.getInstance(TimeZones.GMT);
@@ -74,14 +88,7 @@ private void testLocales(final TriFunction<String, TimeZone, Locale, DateParser>
             cal.set(Calendar.ERA, GregorianCalendar.BC);
         }
         for (final Locale locale : LocaleUtils.availableLocaleList()) {
-            // ja_JP_JP cannot handle dates before 1868 properly
-            if (eraBC && locale.equals(FastDateParser.JAPANESE_IMPERIAL)) {
-                continue;
-            }
-            final SimpleDateFormat sdf = new SimpleDateFormat(format, locale);
-            final DateParser fdf = dbProvider.apply(format, TimeZone.getDefault(), locale);
-            // If parsing fails, a ParseException will be thrown and the test will fail
-            FastDateParserTest.checkParse(locale, cal, sdf, fdf);
+            testLocale(dbProvider, format, eraBC, cal, locale);
         }
     }
 


(commons-lang) 02/08: Tests now traverse Locales deterministically

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 07bcc200abc6bc0f20ac99bc9537b6c72e922e64
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 19 17:33:21 2025 -0500

    Tests now traverse Locales deterministically
---
 .../org/apache/commons/lang3/time/Java15BugFastDateParserTest.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java b/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java
index fbbb8f0e6..ce4986d54 100644
--- a/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/Java15BugFastDateParserTest.java
@@ -25,6 +25,7 @@
 import java.util.TimeZone;
 
 import org.apache.commons.lang3.AbstractLangTest;
+import org.apache.commons.lang3.LocaleUtils;
 import org.apache.commons.lang3.function.TriFunction;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -46,7 +47,7 @@ class Java15BugFastDateParserTest extends AbstractLangTest {
     void testJava15BuggyLocaleTest() throws ParseException {
         final String buggyLocaleName = "ff_LR_#Adlm";
         Locale buggyLocale = null;
-        for (final Locale locale : Locale.getAvailableLocales()) {
+        for (final Locale locale : LocaleUtils.availableLocaleList()) {
             if (buggyLocaleName.equals(locale.toString())) {
                 buggyLocale = locale;
                 break;
@@ -72,7 +73,7 @@ private void testLocales(final TriFunction<String, TimeZone, Locale, DateParser>
         if (eraBC) {
             cal.set(Calendar.ERA, GregorianCalendar.BC);
         }
-        for (final Locale locale : Locale.getAvailableLocales()) {
+        for (final Locale locale : LocaleUtils.availableLocaleList()) {
             // ja_JP_JP cannot handle dates before 1868 properly
             if (eraBC && locale.equals(FastDateParser.JAPANESE_IMPERIAL)) {
                 continue;


(commons-lang) 06/08: Javadoc

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2aad1143acb69c6320c949ad0386119e43c1bf23
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 19 17:43:38 2025 -0500

    Javadoc
---
 src/main/java/org/apache/commons/lang3/SystemUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java
index c28b697dc..074384145 100644
--- a/src/main/java/org/apache/commons/lang3/SystemUtils.java
+++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java
@@ -381,7 +381,7 @@ public class SystemUtils {
     public static final String JAVA_SPECIFICATION_VERSION = SystemProperties.getJavaSpecificationVersion();
 
     /**
-     * A constant for the Java version, may be null
+     * A constant for the Java version, may be null.
      */
     private static final JavaVersion JAVA_SPECIFICATION_VERSION_ENUM = JavaVersion.get(JAVA_SPECIFICATION_VERSION);
 


(commons-lang) 04/08: Javadoc

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 472cb8294ee5ec20f4022cd85692e4f02ca9d581
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 19 17:39:04 2025 -0500

    Javadoc
---
 .../java/org/apache/commons/lang3/JavaVersion.java | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/JavaVersion.java b/src/main/java/org/apache/commons/lang3/JavaVersion.java
index b0e15bfca..af13d4ae4 100644
--- a/src/main/java/org/apache/commons/lang3/JavaVersion.java
+++ b/src/main/java/org/apache/commons/lang3/JavaVersion.java
@@ -220,8 +220,8 @@ public enum JavaVersion {
     /**
      * Transforms the given string with a Java version number to the corresponding constant of this enumeration class. This method is used internally.
      *
-     * @param versionStr the Java version as string
-     * @return the corresponding enumeration constant or <strong>null</strong> if the version is unknown
+     * @param versionStr the Java version as string.
+     * @return the corresponding enumeration constant or <strong>null</strong> if the version is unknown.
      */
     static JavaVersion get(final String versionStr) {
         if (versionStr == null) {
@@ -302,8 +302,8 @@ static JavaVersion get(final String versionStr) {
     /**
      * Transforms the given string with a Java version number to the corresponding constant of this enumeration class. This method is used internally.
      *
-     * @param versionStr the Java version as string
-     * @return the corresponding enumeration constant or <strong>null</strong> if the version is unknown
+     * @param versionStr the Java version as string.
+     * @return the corresponding enumeration constant or <strong>null</strong> if the version is unknown.
      */
     static JavaVersion getJavaVersion(final String versionStr) {
         return get(versionStr);
@@ -354,8 +354,8 @@ private static float toFloatVersion(final String value) {
     /**
      * Constructs a new instance.
      *
-     * @param value the float value
-     * @param name  the standard name, not null
+     * @param value the float value.
+     * @param name  the standard name, not null.
      */
     JavaVersion(final float value, final String name) {
         this.value = value;
@@ -374,8 +374,8 @@ private static float toFloatVersion(final String value) {
      * myVersion.atLeast(JavaVersion.JAVA_1_8)
      * }</pre>
      *
-     * @param requiredVersion the version to check against, not null
-     * @return true if this version is equal to or greater than the specified version
+     * @param requiredVersion the version to check against, not null.
+     * @return true if this version is equal to or greater than the specified version.
      */
     public boolean atLeast(final JavaVersion requiredVersion) {
         return this.value >= requiredVersion.value;
@@ -393,8 +393,8 @@ public boolean atLeast(final JavaVersion requiredVersion) {
      * myVersion.atMost(JavaVersion.JAVA_1_4)
      * }</pre>
      *
-     * @param requiredVersion the version to check against, not null
-     * @return true if this version is equal to or greater than the specified version
+     * @param requiredVersion the version to check against, not null.
+     * @return true if this version is equal to or greater than the specified version.
      * @since 3.9
      */
     public boolean atMost(final JavaVersion requiredVersion) {
@@ -408,7 +408,7 @@ public boolean atMost(final JavaVersion requiredVersion) {
      * For example, {@code "1.5"}.
      * </p>
      *
-     * @return the name, not null
+     * @return the name, not null.
      */
     @Override
     public String toString() {


(commons-lang) 05/08: Rename internal constant

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3d576e2e0efed2e3639a70c247edb7a89ffb5645
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 19 17:43:23 2025 -0500

    Rename internal constant
---
 src/main/java/org/apache/commons/lang3/SystemUtils.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java
index deb1c1c0f..c28b697dc 100644
--- a/src/main/java/org/apache/commons/lang3/SystemUtils.java
+++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java
@@ -383,7 +383,7 @@ public class SystemUtils {
     /**
      * A constant for the Java version, may be null
      */
-    private static final JavaVersion JAVA_SPECIFICATION_VERSION_AS_ENUM = JavaVersion.get(JAVA_SPECIFICATION_VERSION);
+    private static final JavaVersion JAVA_SPECIFICATION_VERSION_ENUM = JavaVersion.get(JAVA_SPECIFICATION_VERSION);
 
     /**
      * A constant for the System Property {@code java.util.prefs.PreferencesFactory}. A class name.
@@ -2366,7 +2366,7 @@ public static boolean isJavaAwtHeadless() {
      * @return {@code true} if the actual version is equal or greater than the required version.
      */
     public static boolean isJavaVersionAtLeast(final JavaVersion requiredVersion) {
-        return JAVA_SPECIFICATION_VERSION_AS_ENUM != null && JAVA_SPECIFICATION_VERSION_AS_ENUM.atLeast(requiredVersion);
+        return JAVA_SPECIFICATION_VERSION_ENUM != null && JAVA_SPECIFICATION_VERSION_ENUM.atLeast(requiredVersion);
     }
 
     /**
@@ -2380,7 +2380,7 @@ public static boolean isJavaVersionAtLeast(final JavaVersion requiredVersion) {
      * @since 3.9
      */
     public static boolean isJavaVersionAtMost(final JavaVersion requiredVersion) {
-        return JAVA_SPECIFICATION_VERSION_AS_ENUM != null && JAVA_SPECIFICATION_VERSION_AS_ENUM.atMost(requiredVersion);
+        return JAVA_SPECIFICATION_VERSION_ENUM != null && JAVA_SPECIFICATION_VERSION_ENUM.atMost(requiredVersion);
     }
 
     /**