From 6f0043e21ada2cf624d59e702b58c0516c7e6b3e Mon Sep 17 00:00:00 2001 From: Dimitrios Efthymiou Date: Sun, 2 Jul 2023 15:16:39 +0100 Subject: [PATCH 1/3] updated the JavaDoc for the insert methods to say the methods return also null if the input array is null (#1078) --- .../org/apache/commons/lang3/ArrayUtils.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java b/src/main/java/org/apache/commons/lang3/ArrayUtils.java index 5cf8b67b8..add450482 100644 --- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java +++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java @@ -2775,7 +2775,7 @@ public class ArrayUtils { * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} - * @return The new array. + * @return The new array or {@code null} if the given array is {@code null}. * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 @@ -2817,7 +2817,7 @@ public class ArrayUtils { * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} - * @return The new array. + * @return The new array or {@code null} if the given array is {@code null}. * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 @@ -2859,7 +2859,7 @@ public class ArrayUtils { * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} - * @return The new array. + * @return The new array or {@code null} if the given array is {@code null}. * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 @@ -2901,7 +2901,7 @@ public class ArrayUtils { * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} - * @return The new array. + * @return The new array or {@code null} if the given array is {@code null}. * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 @@ -2943,7 +2943,7 @@ public class ArrayUtils { * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} - * @return The new array. + * @return The new array or {@code null} if the given array is {@code null}. * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 @@ -2985,7 +2985,7 @@ public class ArrayUtils { * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} - * @return The new array. + * @return The new array or {@code null} if the given array is {@code null}. * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 @@ -3027,7 +3027,7 @@ public class ArrayUtils { * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} - * @return The new array. + * @return The new array or {@code null} if the given array is {@code null}. * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 @@ -3069,7 +3069,7 @@ public class ArrayUtils { * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} - * @return The new array. + * @return The new array or {@code null} if the given array is {@code null}. * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 @@ -3112,7 +3112,7 @@ public class ArrayUtils { * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} - * @return The new array. + * @return The new array or {@code null} if the given array is {@code null}. * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 From 3e5edfdf02231b1c7f2b88ac5e9d3c88f8b695c7 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sun, 2 Jul 2023 10:20:59 -0400 Subject: [PATCH 2/3] Update Javadoc for the insert methods in ArrayUtils #1078 --- src/changes/changes.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index e2373bc52..f6d2eabae 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -119,8 +119,8 @@ The type attribute can be add,update,fix,remove. [LANG-1681] Fix some FieldUtils Javadocs #1047. Remove unnecessary statement in DurationFormatUtils #965. Corrected value of SystemUtils.JAVA_VENDOR #1066. - [StepSecurity] ci: Harden GitHub Actions #1067. - + [StepSecurity] ci: Harden GitHub Actions #1067. + Update Javadoc for the insert methods in ArrayUtils #1078. Add GitHub coverage.yml. Add EnumUtils.getEnumSystemProperty(...). From 3c02dfc467dfbfd5f1a40ad15b55df04e9441895 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sun, 2 Jul 2023 10:21:34 -0400 Subject: [PATCH 3/3] Update Javadoc for the insert methods in ArrayUtils #1078. --- src/changes/changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index f6d2eabae..98a831c53 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -120,7 +120,7 @@ The type attribute can be add,update,fix,remove. Remove unnecessary statement in DurationFormatUtils #965. Corrected value of SystemUtils.JAVA_VENDOR #1066. [StepSecurity] ci: Harden GitHub Actions #1067. - Update Javadoc for the insert methods in ArrayUtils #1078. + Update Javadoc for the insert methods in ArrayUtils #1078. Add GitHub coverage.yml. Add EnumUtils.getEnumSystemProperty(...).