@@ -38,9 +38,11 @@ public void contains() throws Exception {
3838
3939 assertFalse (ArrayUtils .contains (null , "ab" ));
4040 assertFalse (ArrayUtils .contains (new String [] {}, "ab" ));
41+ assertFalse (ArrayUtils .contains (ArrayUtils .EMPTY_STRING_ARRAY , "ab" ));
4142 assertFalse (ArrayUtils .contains (new String [] {"cd" , "ab" }, "x" ));
4243
4344 assertThrows (IllegalArgumentException .class , () -> ArrayUtils .contains (new String [] {}, null ));
45+ assertThrows (IllegalArgumentException .class , () -> ArrayUtils .contains (ArrayUtils .EMPTY_STRING_ARRAY , null ));
4446 }
4547
4648 /**
@@ -58,9 +60,12 @@ public void containsIgnoreCase() throws Exception {
5860
5961 assertFalse (ArrayUtils .containsIgnoreCase (null , "ab" ));
6062 assertFalse (ArrayUtils .containsIgnoreCase (new String [] {}, "ab" ));
63+ assertFalse (ArrayUtils .containsIgnoreCase (ArrayUtils .EMPTY_STRING_ARRAY , "ab" ));
6164 assertFalse (ArrayUtils .containsIgnoreCase (new String [] {"cd" , "ab" }, "x" ));
6265
6366 assertThrows (IllegalArgumentException .class , () -> ArrayUtils .containsIgnoreCase (new String [] {}, null ));
67+ assertThrows (IllegalArgumentException .class ,
68+ () -> ArrayUtils .containsIgnoreCase (ArrayUtils .EMPTY_STRING_ARRAY , null ));
6469 }
6570
6671 /**
@@ -74,6 +79,7 @@ public void containsByte() throws Exception {
7479
7580 assertFalse (ArrayUtils .contains (null , (byte ) 7 ));
7681 assertFalse (ArrayUtils .contains (new byte [] {}, (byte ) 1 ));
82+ assertFalse (ArrayUtils .contains (ArrayUtils .EMPTY_BYTE_ARRAY , (byte ) 1 ));
7783 assertFalse (ArrayUtils .contains (new byte [] {7 , 9 }, (byte ) 4 ));
7884 }
7985}
0 commit comments