garydgregory commented on code in PR #1559:
URL: https://github.com/apache/commons-lang/pull/1559#discussion_r2678590136


##########
src/main/java/org/apache/commons/lang3/ArrayUtils.java:
##########
@@ -194,9 +194,18 @@ public class ArrayUtils {
      * The {@code SOFT_MAX_ARRAY_LENGTH} constant from Java's internal 
ArraySupport class.
      *
      * @since 3.19.0
+     * @deprecated Use {@link #MAX_ARRAY_LENGTH}.
      */
+    @Deprecated
     public static int SOFT_MAX_ARRAY_LENGTH = Integer.MAX_VALUE - 8;
 
+    /**
+     * The {@code MAX_ARRAY_LENGTH} constant from Java's internal ArraySupport 
class.
+     *
+     * @since 3.21.0
+     */
+    public static final int MAX_ARRAY_LENGTH = Integer.MAX_VALUE - 8;

Review Comment:
   Let's call the new one `SAFE_MAX_ARRAY_LENGTH`.



##########
src/main/java/org/apache/commons/lang3/ArrayUtils.java:
##########
@@ -194,9 +194,18 @@ public class ArrayUtils {
      * The {@code SOFT_MAX_ARRAY_LENGTH} constant from Java's internal 
ArraySupport class.
      *
      * @since 3.19.0
+     * @deprecated Use {@link #MAX_ARRAY_LENGTH}.

Review Comment:
   Let's say: `This variable will be final in 4.0; to guarantee immutability 
now, use {@link #SAFE_MAX_ARRAY_LENGTH}.`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to