mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix bug
This commit is contained in:
@@ -527,4 +527,11 @@ public class ArrayUtilTest {
|
||||
result = ArrayUtil.replace(g, 0, h);
|
||||
Assert.assertArrayEquals(g, result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setOrAppendTest(){
|
||||
String[] arr = new String[0];
|
||||
String[] newArr = ArrayUtil.setOrAppend(arr, 0, "Good");// ClassCastException
|
||||
Assert.assertArrayEquals(new String[]{"Good"}, newArr);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user