Skip to content

Commit b03294c

Browse files
committed
performance
1 parent 8536d16 commit b03294c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lts-core/src/main/java/com/github/ltsopensource/core/support/bean/BeanCopierFactory.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ private static String getMethodImplCode(Integer sequence, Class<?> sourceClass,
120120
Class<?> targetFieldClass = field.getType();
121121

122122
Method setMethod = ReflectionUtils.findMethod(targetClass, "set" + methodNameSuffix, targetFieldClass);
123+
if (setMethod == null) {
124+
setMethod = ReflectionUtils.findMethod(targetClass, "set" + field.getName(), targetFieldClass);
125+
if (setMethod != null) {
126+
methodNameSuffix = field.getName();
127+
}
128+
}
123129
if (setMethod != null) {
124130

125131
// 查看这个属性是否有 PropConverter

0 commit comments

Comments
 (0)