All branches in a conditional structure should not have exactly the same implementation
This commit is contained in:
parent
ab96bb5428
commit
93abe0e94b
|
@ -385,10 +385,8 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
|
|||
|
||||
int numUnboundArgs = this.parameterTypes.length;
|
||||
Class<?>[] parameterTypes = this.aspectJAdviceMethod.getParameterTypes();
|
||||
if (maybeBindJoinPoint(parameterTypes[0]) || maybeBindProceedingJoinPoint(parameterTypes[0])) {
|
||||
numUnboundArgs--;
|
||||
}
|
||||
else if (maybeBindJoinPointStaticPart(parameterTypes[0])) {
|
||||
if (maybeBindJoinPoint(parameterTypes[0]) || maybeBindProceedingJoinPoint(parameterTypes[0]) ||
|
||||
maybeBindJoinPointStaticPart(parameterTypes[0])) {
|
||||
numUnboundArgs--;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -347,10 +347,7 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
|
|||
if (typeDescriptor == null) {
|
||||
// Attempt to populate the cache entry
|
||||
try {
|
||||
if (canRead(context, target, name)) {
|
||||
typeDescriptor = this.typeDescriptorCache.get(cacheKey);
|
||||
}
|
||||
else if (canWrite(context, target, name)) {
|
||||
if (canRead(context, target, name) || canWrite(context, target, name)) {
|
||||
typeDescriptor = this.typeDescriptorCache.get(cacheKey);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -268,10 +268,7 @@ public class UrlPathHelper {
|
|||
}
|
||||
c1 = requestUri.charAt(index1);
|
||||
}
|
||||
if (c1 == c2) {
|
||||
continue;
|
||||
}
|
||||
else if (ignoreCase && (Character.toLowerCase(c1) == Character.toLowerCase(c2))) {
|
||||
if (c1 == c2 || ignoreCase && (Character.toLowerCase(c1) == Character.toLowerCase(c2))) {
|
||||
continue;
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue