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


The following commit(s) were added to refs/heads/master by this push:
     new 0d0681c4b Move package-provate constant to satisfy Java 8
0d0681c4b is described below

commit 0d0681c4b34fe54ace1d5f08c2ff2a1cfe4e2c8b
Author: Gary D. Gregory <[email protected]>
AuthorDate: Mon Aug 25 16:36:38 2025 -0400

    Move package-provate constant to satisfy Java 8
---
 src/main/java/org/apache/commons/lang3/JavaVersion.java | 9 +--------
 src/main/java/org/apache/commons/lang3/RegExUtils.java  | 5 +++++
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/JavaVersion.java 
b/src/main/java/org/apache/commons/lang3/JavaVersion.java
index 9d4681b83..e83205824 100644
--- a/src/main/java/org/apache/commons/lang3/JavaVersion.java
+++ b/src/main/java/org/apache/commons/lang3/JavaVersion.java
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.lang3;
 
-import java.util.regex.Pattern;
-
 import org.apache.commons.lang3.math.NumberUtils;
 
 /**
@@ -199,11 +197,6 @@ public enum JavaVersion {
      */
     JAVA_RECENT(maxVersion(), Float.toString(maxVersion()));
 
-    /**
-     * The regex to split version pattern.
-     */
-    private static final Pattern VERSION_SPLIT_PATTERN = 
Pattern.compile("\\.");
-
     /**
      * Transforms the given string with a Java version number to the
      * corresponding constant of this enumeration class. This method is used
@@ -307,7 +300,7 @@ private static float maxVersion() {
     }
 
     static String[] split(final String value) {
-        return VERSION_SPLIT_PATTERN.split(value);
+        return RegExUtils.VERSION_SPLIT_PATTERN.split(value);
     }
 
     /**
diff --git a/src/main/java/org/apache/commons/lang3/RegExUtils.java 
b/src/main/java/org/apache/commons/lang3/RegExUtils.java
index 01fac3757..a4ac39ba0 100644
--- a/src/main/java/org/apache/commons/lang3/RegExUtils.java
+++ b/src/main/java/org/apache/commons/lang3/RegExUtils.java
@@ -28,6 +28,11 @@
  */
 public class RegExUtils {
 
+    /**
+     * The pattern to split version strings.
+     */
+    static final Pattern VERSION_SPLIT_PATTERN = Pattern.compile("\\.");
+
     /**
      * Compiles the given regular expression into a pattern with the {@link 
Pattern#DOTALL} flag.
      *

Reply via email to