Browse Source

Polishing

pull/30096/head
Sam Brannen 3 years ago
parent
commit
2e5d0470dc
  1. 4
      spring-beans/src/main/java/org/springframework/beans/BeanUtils.java

4
spring-beans/src/main/java/org/springframework/beans/BeanUtils.java

@ -792,11 +792,11 @@ public abstract class BeanUtils { @@ -792,11 +792,11 @@ public abstract class BeanUtils {
actualEditable = editable;
}
PropertyDescriptor[] targetPds = getPropertyDescriptors(actualEditable);
Set<String> ignoreSet = (ignoreProperties != null ? new HashSet<>(Arrays.asList(ignoreProperties)) : null);
Set<String> ignoredProps = (ignoreProperties != null ? new HashSet<>(Arrays.asList(ignoreProperties)) : null);
for (PropertyDescriptor targetPd : targetPds) {
Method writeMethod = targetPd.getWriteMethod();
if (writeMethod != null && (ignoreSet == null || !ignoreSet.contains(targetPd.getName()))) {
if (writeMethod != null && (ignoredProps == null || !ignoredProps.contains(targetPd.getName()))) {
PropertyDescriptor sourcePd = getPropertyDescriptor(source.getClass(), targetPd.getName());
if (sourcePd != null) {
Method readMethod = sourcePd.getReadMethod();

Loading…
Cancel
Save