Polishing

This commit is contained in:
Sam Brannen 2023-03-09 14:19:59 +01:00
parent d2868f5dd0
commit 2e5d0470dc
1 changed files with 2 additions and 2 deletions

View File

@ -792,11 +792,11 @@ public abstract class BeanUtils {
actualEditable = editable; actualEditable = editable;
} }
PropertyDescriptor[] targetPds = getPropertyDescriptors(actualEditable); 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) { for (PropertyDescriptor targetPd : targetPds) {
Method writeMethod = targetPd.getWriteMethod(); 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()); PropertyDescriptor sourcePd = getPropertyDescriptor(source.getClass(), targetPd.getName());
if (sourcePd != null) { if (sourcePd != null) {
Method readMethod = sourcePd.getReadMethod(); Method readMethod = sourcePd.getReadMethod();