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/08/06 12:44:51 UTC

(commons-lang) 01/02: Add org.apache.commons.lang3.ArrayUtils.SOFT_MAX_ARRAY_LENGTH

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 893b963cbf6a192c139cde647231deb1b9fde8e1
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Wed Aug 6 08:43:47 2025 -0400

    Add org.apache.commons.lang3.ArrayUtils.SOFT_MAX_ARRAY_LENGTH
    
    Update release version to next feature version
---
 src/changes/changes.xml                                | 3 ++-
 src/main/java/org/apache/commons/lang3/ArrayUtils.java | 7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d2a4e53fd..a637e5b10 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -44,7 +44,7 @@ The <action> type attribute can be add,update,fix,remove.
     <title>Apache Commons Lang Release Notes</title>
   </properties>
   <body>
-  <release version="3.18.1" date="YYYY-MM-DD" description="This is a feature and maintenance release. Java 8 or later is required.">
+  <release version="3.19.0" date="YYYY-MM-DD" description="This is a feature and maintenance release. Java 8 or later is required.">
     <!-- FIX -->
     <action                   type="fix" dev="ppkarwasz" due-to="Sebastian Steiner">[javadoc] Fix typo in Javadoc of Strings instances #1406.</action>
     <action                   type="fix" dev="ggregory" due-to="Hassan A Hashim">[javadoc] Fix Javadocs in ClassUtils #1410.</action>
@@ -57,6 +57,7 @@ The <action> type attribute can be add,update,fix,remove.
     <action                   type="fix" dev="ggregory" due-to="Gary Gregory">General Javadoc improvements.</action>
     <action issue="LANG-1780" type="fix" dev="ggregory" due-to="tza">Fix Strings Javadoc #1419.</action>
     <!-- ADD -->
+    <action                   type="fix" dev="ggregory" due-to="Gary Gregory">Add org.apache.commons.lang3.ArrayUtils.SOFT_MAX_ARRAY_LENGTH.</action>
     <!-- UPDATE -->
     <action type="update" dev="ggregory" due-to="Gary Gregory">[test] Bump org.apache.commons:commons-text from 1.13.1 to 1.14.0.</action>
   </release>
diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
index aae2ce34f..7377e66bb 100644
--- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
@@ -190,6 +190,13 @@ public class ArrayUtils {
      */
     public static final int INDEX_NOT_FOUND = -1;
 
+    /**
+     * The {@code SOFT_MAX_ARRAY_LENGTH} constant from Java's internal ArraySupport class.
+     *
+     * @since 3.19.0
+     */
+    public static int SOFT_MAX_ARRAY_LENGTH = Integer.MAX_VALUE - 8;
+
     /**
      * Copies the given array and adds the given element at the end of the new array.
      * <p>