Polishing
This commit is contained in:
parent
d2868f5dd0
commit
2e5d0470dc
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue