mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
PropDesc.isTransientForGet使用className,避免Android下类找不到问题
This commit is contained in:
parent
2b0dee29fa
commit
e2a109c1d7
@ -442,13 +442,16 @@ public class PropDesc {
|
||||
|
||||
// 检查注解
|
||||
if (!isTransient) {
|
||||
Class aClass = null;
|
||||
try {
|
||||
// issue#IB0JP5,Android可能无这个类
|
||||
final Class aClass = Class.forName("java.beans.Transient");
|
||||
isTransient = AnnotationUtil.hasAnnotation(getterMethod, aClass);
|
||||
aClass = Class.forName("java.beans.Transient");
|
||||
} catch (final ClassNotFoundException e) {
|
||||
// ignore
|
||||
}
|
||||
if(null != aClass){
|
||||
isTransient = AnnotationUtil.hasAnnotation(getterMethod, aClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user