处理问题
This commit is contained in:
parent
e0532a7028
commit
2b7d5f3121
@ -59,7 +59,13 @@ public class XMLUtil {
|
||||
String firstLower = elementName.substring(0, 1).toLowerCase();
|
||||
String firstLowerMethodName = firstLower + elementName.substring(1);
|
||||
String[] getSetMethodArray = getSetMethodMap.get(firstLowerMethodName);
|
||||
if (getSetMethodArray == null) {
|
||||
continue;
|
||||
}
|
||||
Method setMethod = clazz.getMethod(getSetMethodArray[1], String.class);
|
||||
if (setMethod == null) {
|
||||
continue;
|
||||
}
|
||||
String elementText = element.getTextTrim();
|
||||
setMethod.invoke(t, StringUtils.isBlank(elementText) ? "" : elementText);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user