提交 24e470a2 编写于 作者: K kohsuke

a little bit of performance improvement

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11815 71c3de6d-444a-0410-be80-ed276b4c234a
上级 b78171d0
......@@ -224,11 +224,7 @@ public class RobustReflectionConverter implements Converter {
private boolean fieldDefinedInClass(Object result, String attrName) {
// during unmarshalling, unmarshal into transient fields like XStream 1.1.3
//boolean fieldExistsInClass = reflectionProvider.fieldDefinedInClass(attrName, result.getClass());
try {
return reflectionProvider.getField(result.getClass(),attrName)!=null;
} catch (ObjectAccessException e) {
return false;
}
return reflectionProvider.getFieldOrNull(result.getClass(),attrName)!=null;
}
protected Object unmarshallField(final UnmarshallingContext context, final Object result, Class type, Field field) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册