add null check

This commit is contained in:
Looly
2022-05-20 11:33:56 +08:00
parent 586b8d2c85
commit b5619fefbd
4 changed files with 27 additions and 14 deletions

View File

@@ -567,6 +567,11 @@ public class BeanUtilTest {
Assert.assertNull(newFood.getCode());
}
@Test
public void copyNullTest() {
Assert.assertNull(BeanUtil.copyProperties(null, Food.class));
}
@Test
public void copyBeanPropertiesFilterTest() {
final Food info = new Food();