mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
修复BeanUtil.hasGetter没有跳过getClass方法的问题
This commit is contained in:
@@ -918,4 +918,11 @@ public class BeanUtilTest {
|
||||
userEntity.setSex(0);
|
||||
Assert.assertTrue(BeanUtil.isCommonFieldsEqual(userDTO, userEntity, "age", "sex"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void hasGetterTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I6M7Z7
|
||||
final boolean b = BeanUtil.hasGetter(Object.class);
|
||||
Assert.assertFalse(b);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user