mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add null check
This commit is contained in:
@@ -257,6 +257,13 @@ public class BeanUtilTest {
|
||||
Assert.assertEquals("sub名字", subName);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
public void getNullPropertyTest() {
|
||||
final Object property = BeanUtil.getProperty(null, "name");
|
||||
Assert.assertNull(property);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getPropertyDescriptorsTest() {
|
||||
HashSet<Object> set = CollUtil.newHashSet();
|
||||
|
Reference in New Issue
Block a user