处理问题

This commit is contained in:
wanggeng888 2021-04-28 21:17:14 +08:00
parent e0532a7028
commit 2b7d5f3121

View File

@ -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);
}