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 037880852 ArrayUtils.shuffle() throws NullPointerException for null 
array input (#1553)
037880852 is described below

commit 037880852770c3124f8d61c2dbf2b31f34a75508
Author: Raju Gupta <[email protected]>
AuthorDate: Fri Jan 9 20:50:00 2026 +0000

    ArrayUtils.shuffle() throws NullPointerException for null array input 
(#1553)
    
    * Add failing test for LANG-1811
    
    * Enhance testShuffleNull to cover all array types for null input
    
    * Fix testShuffleByteRandom to use EMPTY_BYTE_ARRAY instead of 
EMPTY_BOOLEAN_ARRAY
    
    * Fix testShuffleByteRandom to use EMPTY_BYTE_ARRAY instead of 
EMPTY_BOOLEAN_ARRAY
    
    ---------
    
    Co-authored-by: raju.gupta <[email protected]>
---
 src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
index 6aefafa7b..cb3a38eea 100644
--- a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
@@ -5249,8 +5249,8 @@ void testShuffleByte() {
     void testShuffleByteRandom() {
         ArrayUtils.shuffle((byte[]) null, null);
         ArrayUtils.shuffle((byte[]) null, seededRandom());
-        ArrayUtils.shuffle(ArrayUtils.EMPTY_BOOLEAN_ARRAY, null);
-        ArrayUtils.shuffle(ArrayUtils.EMPTY_BOOLEAN_ARRAY, seededRandom());
+        ArrayUtils.shuffle(ArrayUtils.EMPTY_BYTE_ARRAY, null);
+        ArrayUtils.shuffle(ArrayUtils.EMPTY_BYTE_ARRAY, seededRandom());
         // Don't use a "small" array, reduce spurious failures.
         final byte[] array1 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 
5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 
1, 2,
                 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 
4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,

Reply via email to