Bug fix for array isempty checks
This commit is contained in:
parent
19a12dee44
commit
09cce76707
3 changed files with 13 additions and 3 deletions
|
|
@ -44,6 +44,7 @@ public class ObjectUtilTest {
|
|||
assertTrue(ObjectUtil.isEmpty(new HashMap<>(), ""));
|
||||
assertTrue(ObjectUtil.isEmpty(new Hashtable<>(), ""));
|
||||
assertTrue(ObjectUtil.isEmpty((Object) new String[0]));
|
||||
assertTrue(ObjectUtil.isEmpty(new int[0]));
|
||||
|
||||
|
||||
assertFalse(ObjectUtil.isEmpty(" ", ""));
|
||||
|
|
@ -52,6 +53,7 @@ public class ObjectUtilTest {
|
|||
assertFalse(ObjectUtil.isEmpty("", new StringBuffer("a")));
|
||||
assertFalse(ObjectUtil.isEmpty("", Arrays.asList(1, 2, 3)));
|
||||
assertFalse(ObjectUtil.isEmpty((Object) new String[]{"a"}));
|
||||
assertFalse(ObjectUtil.isEmpty(new int[2]));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue