修正ExcelField声明在get方法上时提示wrong number of arguments
This commit is contained in:
@@ -538,15 +538,13 @@ public class ExcelImport implements Closeable {
|
|||||||
ReflectUtils.invokeSetter(e, ef.attrName(), val);
|
ReflectUtils.invokeSetter(e, ef.attrName(), val);
|
||||||
}else{
|
}else{
|
||||||
if (os[1] instanceof Field){
|
if (os[1] instanceof Field){
|
||||||
//ReflectUtils.invokeSetter(e, ((Field)os[1]).getName(), val);
|
ReflectUtils.invokeSetter(e, ((Field)os[1]).getName(), val);
|
||||||
((Field)os[1]).set(e, val);
|
|
||||||
}else if (os[1] instanceof Method){
|
}else if (os[1] instanceof Method){
|
||||||
//String mthodName = ((Method)os[1]).getName();
|
String mthodName = ((Method)os[1]).getName();
|
||||||
//if ("get".equals(mthodName.substring(0, 3))){
|
if ("get".equals(mthodName.substring(0, 3))){
|
||||||
// mthodName = "set"+StringUtils.substringAfter(mthodName, "get");
|
mthodName = "set"+mthodName.substring(3);
|
||||||
//}
|
}
|
||||||
//ReflectUtils.invokeMethod(e, mthodName, new Class[] {valType}, new Object[] {val});
|
ReflectUtils.invokeMethodByAsm(e, mthodName, val);
|
||||||
((Method)os[1]).invoke(e, val);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user