All branches in a conditional structure should not have exactly the same implementation
This commit is contained in:
committed by
Juergen Hoeller
parent
ab96bb5428
commit
93abe0e94b
@@ -285,11 +285,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
|
||||
for (PropertyValue newPv : this.propertyValueList) {
|
||||
// if there wasn't an old one, add it
|
||||
PropertyValue pvOld = old.getPropertyValue(newPv.getName());
|
||||
if (pvOld == null) {
|
||||
changes.addPropertyValue(newPv);
|
||||
}
|
||||
else if (!pvOld.equals(newPv)) {
|
||||
// it's changed
|
||||
if (pvOld == null || !pvOld.equals(newPv)) {
|
||||
changes.addPropertyValue(newPv);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,12 +409,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
|
||||
}
|
||||
|
||||
private boolean addDeferredProperty(String property, Object newValue) {
|
||||
if (newValue instanceof List) {
|
||||
this.deferredProperties.put(this.currentBeanDefinition.getBeanName() + '.' + property,
|
||||
new DeferredProperty(this.currentBeanDefinition, property, newValue));
|
||||
return true;
|
||||
}
|
||||
else if (newValue instanceof Map) {
|
||||
if (newValue instanceof List || newValue instanceof Map) {
|
||||
this.deferredProperties.put(this.currentBeanDefinition.getBeanName() + '.' + property,
|
||||
new DeferredProperty(this.currentBeanDefinition, property, newValue));
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user