当使用链式编程的时候,如Lombok的@accessors(chain = true)注解,pd.getWriteMethod()会返回空导致无法进行映射
参考: https://stackoverflow.com/questions/10806895/why-did-propertydescriptor-behavior-change-from-java-1-6-to-1-7
具体代码位置:
PropertyDescriptor pd = pds[i];
if (pd.getWriteMethod() != null) {
}
|
if (pd.getWriteMethod() != null) { |