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 c28cc55f0 LANG-1819: Fix ArrayUtils.removeAll() Javadoc for null array 
input (#1614)
c28cc55f0 is described below

commit c28cc55f0db71abcd82b6a8606dfa29d6ed73f92
Author: Partha Protim Paul <[email protected]>
AuthorDate: Fri Mar 6 12:08:25 2026 -0800

    LANG-1819: Fix ArrayUtils.removeAll() Javadoc for null array input (#1614)
    
    * updated the javadoc for Arrayutils.removeAll to match the implementation 
which returns null in case of null input
    
    * fixed the grammar
    
    * fixed the grammar
---
 .../java/org/apache/commons/lang3/ArrayUtils.java  | 54 +++++++++++-----------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java 
b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
index 1faa21e5f..1288394db 100644
--- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
@@ -5276,7 +5276,7 @@ public static <T> T[] remove(final T[] array, final int 
index) {
      * array is always the same as that of the input array.
      * </p>
      * <p>
-     * If the input array is {@code null}, an IndexOutOfBoundsException will 
be thrown, because in that case no valid index can be specified.
+     * If the input array is {@code null}, {@code null} will be returned.
      * </p>
      *
      * <pre>
@@ -5286,8 +5286,8 @@ public static <T> T[] remove(final T[] array, final int 
index) {
      *
      * @param array   the array to remove the element from, may not be {@code 
null}.
      * @param indices the positions of the elements to be removed.
-     * @return A new array containing the existing elements except those at 
the specified positions.
-     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length), or if the array is {@code null}.
+     * @return A new array containing the existing elements except those at 
the specified positions or {@code null} if the input array is {@code null}.
+     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length).
      * @since 3.0.1
      */
     public static boolean[] removeAll(final boolean[] array, final int... 
indices) {
@@ -5301,7 +5301,7 @@ public static boolean[] removeAll(final boolean[] array, 
final int... indices) {
      * array is always the same as that of the input array.
      * </p>
      * <p>
-     * If the input array is {@code null}, an IndexOutOfBoundsException will 
be thrown, because in that case no valid index can be specified.
+     * If the input array is {@code null}, {@code null} will be returned.
      * </p>
      *
      * <pre>
@@ -5315,8 +5315,8 @@ public static boolean[] removeAll(final boolean[] array, 
final int... indices) {
      *
      * @param array   the array to remove the element from, may not be {@code 
null}.
      * @param indices the positions of the elements to be removed.
-     * @return A new array containing the existing elements except those at 
the specified positions.
-     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length), or if the array is {@code null}.
+     * @return A new array containing the existing elements except those at 
the specified positions or {@code null} if the input array is {@code null}.
+     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length).
      * @since 3.0.1
      */
     public static byte[] removeAll(final byte[] array, final int... indices) {
@@ -5330,7 +5330,7 @@ public static byte[] removeAll(final byte[] array, final 
int... indices) {
      * array is always the same as that of the input array.
      * </p>
      * <p>
-     * If the input array is {@code null}, an IndexOutOfBoundsException will 
be thrown, because in that case no valid index can be specified.
+     * If the input array is {@code null}, {@code null} will be returned.
      * </p>
      *
      * <pre>
@@ -5344,8 +5344,8 @@ public static byte[] removeAll(final byte[] array, final 
int... indices) {
      *
      * @param array   the array to remove the element from, may not be {@code 
null}.
      * @param indices the positions of the elements to be removed.
-     * @return A new array containing the existing elements except those at 
the specified positions.
-     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length), or if the array is {@code null}.
+     * @return A new array containing the existing elements except those at 
the specified positions or {@code null} if the input array is {@code null}.
+     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length).
      * @since 3.0.1
      */
     public static char[] removeAll(final char[] array, final int... indices) {
@@ -5359,7 +5359,7 @@ public static char[] removeAll(final char[] array, final 
int... indices) {
      * array is always the same as that of the input array.
      * </p>
      * <p>
-     * If the input array is {@code null}, an IndexOutOfBoundsException will 
be thrown, because in that case no valid index can be specified.
+     * If the input array is {@code null}, {@code null} will be returned.
      * </p>
      *
      * <pre>
@@ -5373,8 +5373,8 @@ public static char[] removeAll(final char[] array, final 
int... indices) {
      *
      * @param array   the array to remove the element from, may not be {@code 
null}.
      * @param indices the positions of the elements to be removed.
-     * @return A new array containing the existing elements except those at 
the specified positions.
-     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length), or if the array is {@code null}.
+     * @return A new array containing the existing elements except those at 
the specified positions or {@code null} if the input array is {@code null}.
+     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length).
      * @since 3.0.1
      */
     public static double[] removeAll(final double[] array, final int... 
indices) {
@@ -5388,7 +5388,7 @@ public static double[] removeAll(final double[] array, 
final int... indices) {
      * array is always the same as that of the input array.
      * </p>
      * <p>
-     * If the input array is {@code null}, an IndexOutOfBoundsException will 
be thrown, because in that case no valid index can be specified.
+     * If the input array is {@code null}, {@code null} will be returned.
      * </p>
      *
      * <pre>
@@ -5402,8 +5402,8 @@ public static double[] removeAll(final double[] array, 
final int... indices) {
      *
      * @param array   the array to remove the element from, may not be {@code 
null}.
      * @param indices the positions of the elements to be removed.
-     * @return A new array containing the existing elements except those at 
the specified positions.
-     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length), or if the array is {@code null}.
+     * @return A new array containing the existing elements except those at 
the specified positions or {@code null} if the input array is {@code null}.
+     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length).
      * @since 3.0.1
      */
     public static float[] removeAll(final float[] array, final int... indices) 
{
@@ -5417,7 +5417,7 @@ public static float[] removeAll(final float[] array, 
final int... indices) {
      * array is always the same as that of the input array.
      * </p>
      * <p>
-     * If the input array is {@code null}, an IndexOutOfBoundsException will 
be thrown, because in that case no valid index can be specified.
+     * If the input array is {@code null}, {@code null} will be returned.
      * </p>
      *
      * <pre>
@@ -5431,8 +5431,8 @@ public static float[] removeAll(final float[] array, 
final int... indices) {
      *
      * @param array   the array to remove the element from, may not be {@code 
null}.
      * @param indices the positions of the elements to be removed.
-     * @return A new array containing the existing elements except those at 
the specified positions.
-     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length), or if the array is {@code null}.
+     * @return A new array containing the existing elements except those at 
the specified positions or {@code null} if the input array is {@code null}.
+     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length).
      * @since 3.0.1
      */
     public static int[] removeAll(final int[] array, final int... indices) {
@@ -5446,7 +5446,7 @@ public static int[] removeAll(final int[] array, final 
int... indices) {
      * array is always the same as that of the input array.
      * </p>
      * <p>
-     * If the input array is {@code null}, an IndexOutOfBoundsException will 
be thrown, because in that case no valid index can be specified.
+     * If the input array is {@code null}, {@code null} will be returned.
      * </p>
      *
      * <pre>
@@ -5460,8 +5460,8 @@ public static int[] removeAll(final int[] array, final 
int... indices) {
      *
      * @param array   the array to remove the element from, may not be {@code 
null}.
      * @param indices the positions of the elements to be removed.
-     * @return A new array containing the existing elements except those at 
the specified positions.
-     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length), or if the array is {@code null}.
+     * @return A new array containing the existing elements except those at 
the specified positions or {@code null} if the input array is {@code null}.
+     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length).
      * @since 3.0.1
      */
     public static long[] removeAll(final long[] array, final int... indices) {
@@ -5528,7 +5528,7 @@ static Object removeAll(final Object array, final int... 
indices) {
      * array is always the same as that of the input array.
      * </p>
      * <p>
-     * If the input array is {@code null}, an IndexOutOfBoundsException will 
be thrown, because in that case no valid index can be specified.
+     * If the input array is {@code null}, {@code null} will be returned.
      * </p>
      *
      * <pre>
@@ -5542,8 +5542,8 @@ static Object removeAll(final Object array, final int... 
indices) {
      *
      * @param array   the array to remove the element from, may not be {@code 
null}.
      * @param indices the positions of the elements to be removed.
-     * @return A new array containing the existing elements except those at 
the specified positions.
-     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length), or if the array is {@code null}.
+     * @return A new array containing the existing elements except those at 
the specified positions or {@code null} if the input array is {@code null}.
+     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length).
      * @since 3.0.1
      */
     public static short[] removeAll(final short[] array, final int... indices) 
{
@@ -5557,7 +5557,7 @@ public static short[] removeAll(final short[] array, 
final int... indices) {
      * array is always the same as that of the input array.
      * </p>
      * <p>
-     * If the input array is {@code null}, an IndexOutOfBoundsException will 
be thrown, because in that case no valid index can be specified.
+     * If the input array is {@code null}, {@code null} will be returned.
      * </p>
      *
      * <pre>
@@ -5568,8 +5568,8 @@ public static short[] removeAll(final short[] array, 
final int... indices) {
      * @param <T>     the component type of the array.
      * @param array   the array to remove the element from, may not be {@code 
null}.
      * @param indices the positions of the elements to be removed.
-     * @return A new array containing the existing elements except those at 
the specified positions.
-     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length), or if the array is {@code null}.
+     * @return A new array containing the existing elements except those at 
the specified positions or {@code null} if the input array is {@code null}.
+     * @throws IndexOutOfBoundsException if any index is out of range (index 
&lt; 0 || index &gt;= array.length).
      * @since 3.0.1
      */
     @SuppressWarnings("unchecked") // removeAll() always creates an array of 
the same type as its input

Reply via email to