parent
33a0e65135
commit
f2cdced501
|
@ -268,7 +268,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
|
|||
this.argumentNames[i] + "' that is not a valid Java identifier");
|
||||
}
|
||||
}
|
||||
if (this.argumentNames != null) {
|
||||
if (this.aspectJAdviceMethod.getParameterCount() == this.argumentNames.length + 1) {
|
||||
// May need to add implicit join point arg name...
|
||||
Class<?> firstArgType = this.aspectJAdviceMethod.getParameterTypes()[0];
|
||||
|
@ -282,7 +281,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setReturningName(String name) {
|
||||
throw new UnsupportedOperationException("Only afterReturning advice can be used to bind a return value");
|
||||
|
|
|
@ -108,14 +108,10 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
|
|||
List<Element> childElts = DomUtils.getChildElements(element);
|
||||
for (Element elt: childElts) {
|
||||
String localName = parserContext.getDelegate().getLocalName(elt);
|
||||
if (POINTCUT.equals(localName)) {
|
||||
parsePointcut(elt, parserContext);
|
||||
}
|
||||
else if (ADVISOR.equals(localName)) {
|
||||
parseAdvisor(elt, parserContext);
|
||||
}
|
||||
else if (ASPECT.equals(localName)) {
|
||||
parseAspect(elt, parserContext);
|
||||
switch (localName) {
|
||||
case POINTCUT -> parsePointcut(elt, parserContext);
|
||||
case ADVISOR -> parseAdvisor(elt, parserContext);
|
||||
case ASPECT -> parseAspect(elt, parserContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -257,8 +257,7 @@ public abstract class AopProxyUtils {
|
|||
if (ObjectUtils.isEmpty(arguments)) {
|
||||
return new Object[0];
|
||||
}
|
||||
if (method.isVarArgs()) {
|
||||
if (method.getParameterCount() == arguments.length) {
|
||||
if (method.isVarArgs() && (method.getParameterCount() == arguments.length)) {
|
||||
Class<?>[] paramTypes = method.getParameterTypes();
|
||||
int varargIndex = paramTypes.length - 1;
|
||||
Class<?> varargType = paramTypes[varargIndex];
|
||||
|
@ -276,7 +275,6 @@ public abstract class AopProxyUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
|
||||
|
|
|
@ -251,11 +251,10 @@ class CglibAopProxy implements AopProxy, Serializable {
|
|||
private void validateClassIfNecessary(Class<?> proxySuperClass, @Nullable ClassLoader proxyClassLoader) {
|
||||
if (!this.advised.isOptimize() && logger.isInfoEnabled()) {
|
||||
synchronized (validatedClasses) {
|
||||
if (!validatedClasses.containsKey(proxySuperClass)) {
|
||||
doValidateClass(proxySuperClass, proxyClassLoader,
|
||||
ClassUtils.getAllInterfacesForClassAsSet(proxySuperClass));
|
||||
validatedClasses.put(proxySuperClass, Boolean.TRUE);
|
||||
}
|
||||
validatedClasses.computeIfAbsent(proxySuperClass, clazz -> {
|
||||
doValidateClass(clazz, proxyClassLoader, ClassUtils.getAllInterfacesForClassAsSet(clazz));
|
||||
return Boolean.TRUE;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -702,8 +701,7 @@ class CglibAopProxy implements AopProxy, Serializable {
|
|||
// We need to create a method invocation...
|
||||
retVal = new CglibMethodInvocation(proxy, target, method, args, targetClass, chain, methodProxy).proceed();
|
||||
}
|
||||
retVal = processReturnType(proxy, target, method, retVal);
|
||||
return retVal;
|
||||
return processReturnType(proxy, target, method, retVal);
|
||||
}
|
||||
finally {
|
||||
if (target != null && !targetSource.isStatic()) {
|
||||
|
|
|
@ -109,12 +109,10 @@ public class DefaultAdvisorChainFactory implements AdvisorChainFactory, Serializ
|
|||
*/
|
||||
private static boolean hasMatchingIntroductions(Advisor[] advisors, Class<?> actualClass) {
|
||||
for (Advisor advisor : advisors) {
|
||||
if (advisor instanceof IntroductionAdvisor ia) {
|
||||
if (ia.getClassFilter().matches(actualClass)) {
|
||||
if (advisor instanceof IntroductionAdvisor ia && ia.getClassFilter().matches(actualClass)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue