Browse Source

Revert "Merge branch 'SPR-10130' into cleanup-master"

This reverts commit 45fa50821a, reversing
changes made to a312d900f8.
pull/212/head
Chris Beams 12 years ago
parent
commit
70eaf02b7f
  1. 4
      build.gradle
  2. 1
      spring-aop/src/main/java/org/springframework/aop/TargetSource.java
  3. 1
      spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java
  4. 3
      spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java
  5. 2
      spring-aop/src/main/java/org/springframework/aop/TruePointcut.java
  6. 4
      spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java
  7. 2
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java
  8. 3
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java
  9. 3
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterReturningAdvice.java
  10. 3
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterThrowingAdvice.java
  11. 3
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAroundAdvice.java
  12. 20
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
  13. 1
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java
  14. 3
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJMethodBeforeAdvice.java
  15. 4
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java
  16. 4
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java
  17. 6
      spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java
  18. 28
      spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java
  19. 9
      spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java
  20. 3
      spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java
  21. 3
      spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java
  22. 1
      spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java
  23. 4
      spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java
  24. 4
      spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java
  25. 11
      spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java
  26. 4
      spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/LazySingletonAspectInstanceFactoryDecorator.java
  27. 7
      spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java
  28. 1
      spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java
  29. 1
      spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java
  30. 2
      spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java
  31. 1
      spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java
  32. 1
      spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java
  33. 2
      spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java
  34. 1
      spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java
  35. 1
      spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java
  36. 1
      spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java
  37. 4
      spring-aop/src/main/java/org/springframework/aop/config/MethodLocatingFactoryBean.java
  38. 2
      spring-aop/src/main/java/org/springframework/aop/config/PointcutComponentDefinition.java
  39. 1
      spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java
  40. 4
      spring-aop/src/main/java/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.java
  41. 1
      spring-aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java
  42. 4
      spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java
  43. 5
      spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java
  44. 19
      spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java
  45. 13
      spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java
  46. 1
      spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java
  47. 1
      spring-aop/src/main/java/org/springframework/aop/framework/DefaultAopProxyFactory.java
  48. 3
      spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java
  49. 7
      spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java
  50. 11
      spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java
  51. 2
      spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationManager.java
  52. 2
      spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceAdapter.java
  53. 1
      spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceInterceptor.java
  54. 3
      spring-aop/src/main/java/org/springframework/aop/framework/adapter/DefaultAdvisorAdapterRegistry.java
  55. 2
      spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceAdapter.java
  56. 1
      spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceInterceptor.java
  57. 2
      spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceAdapter.java
  58. 1
      spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java
  59. 11
      spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java
  60. 1
      spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java
  61. 3
      spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java
  62. 1
      spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java
  63. 1
      spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java
  64. 3
      spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java
  65. 1
      spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java
  66. 2
      spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java
  67. 2
      spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java
  68. 2
      spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java
  69. 4
      spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java
  70. 2
      spring-aop/src/main/java/org/springframework/aop/support/AbstractBeanFactoryPointcutAdvisor.java
  71. 1
      spring-aop/src/main/java/org/springframework/aop/support/AbstractExpressionPointcut.java
  72. 1
      spring-aop/src/main/java/org/springframework/aop/support/AbstractGenericPointcutAdvisor.java
  73. 2
      spring-aop/src/main/java/org/springframework/aop/support/AbstractPointcutAdvisor.java
  74. 1
      spring-aop/src/main/java/org/springframework/aop/support/AbstractRegexpMethodPointcut.java
  75. 2
      spring-aop/src/main/java/org/springframework/aop/support/ClassFilters.java
  76. 2
      spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java
  77. 6
      spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java
  78. 1
      spring-aop/src/main/java/org/springframework/aop/support/DefaultBeanFactoryPointcutAdvisor.java
  79. 7
      spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java
  80. 1
      spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java
  81. 1
      spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java
  82. 1
      spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java
  83. 2
      spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java
  84. 2
      spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java
  85. 1
      spring-aop/src/main/java/org/springframework/aop/support/IntroductionInfoSupport.java
  86. 8
      spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java
  87. 1
      spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java
  88. 1
      spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java
  89. 2
      spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java
  90. 1
      spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java
  91. 1
      spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java
  92. 2
      spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java
  93. 2
      spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcut.java
  94. 4
      spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcutAdvisor.java
  95. 1
      spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java
  96. 2
      spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java
  97. 1
      spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMethodMatcher.java
  98. 4
      spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java
  99. 4
      spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java
  100. 2
      spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java
  101. Some files were not shown because too many files have changed in this diff Show More

4
build.gradle

@ -33,8 +33,8 @@ configure(allprojects) { @@ -33,8 +33,8 @@ configure(allprojects) {
group = "org.springframework"
compileJava {
sourceCompatibility=1.6
targetCompatibility=1.6
sourceCompatibility=1.5
targetCompatibility=1.5
}
compileTestJava {
sourceCompatibility=1.7

1
spring-aop/src/main/java/org/springframework/aop/TargetSource.java

@ -39,7 +39,6 @@ public interface TargetSource extends TargetClassAware { @@ -39,7 +39,6 @@ public interface TargetSource extends TargetClassAware {
* target class.
* @return the type of targets returned by this {@link TargetSource}
*/
@Override
Class<?> getTargetClass();
/**

1
spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java

@ -34,7 +34,6 @@ class TrueClassFilter implements ClassFilter, Serializable { @@ -34,7 +34,6 @@ class TrueClassFilter implements ClassFilter, Serializable {
private TrueClassFilter() {
}
@Override
public boolean matches(Class clazz) {
return true;
}

3
spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java

@ -35,17 +35,14 @@ class TrueMethodMatcher implements MethodMatcher, Serializable { @@ -35,17 +35,14 @@ class TrueMethodMatcher implements MethodMatcher, Serializable {
private TrueMethodMatcher() {
}
@Override
public boolean isRuntime() {
return false;
}
@Override
public boolean matches(Method method, Class targetClass) {
return true;
}
@Override
public boolean matches(Method method, Class targetClass, Object[] args) {
// Should never be invoked as isRuntime returns false.
throw new UnsupportedOperationException();

2
spring-aop/src/main/java/org/springframework/aop/TruePointcut.java

@ -34,12 +34,10 @@ class TruePointcut implements Pointcut, Serializable { @@ -34,12 +34,10 @@ class TruePointcut implements Pointcut, Serializable {
private TruePointcut() {
}
@Override
public ClassFilter getClassFilter() {
return ClassFilter.TRUE;
}
@Override
public MethodMatcher getMethodMatcher() {
return MethodMatcher.TRUE;
}

4
spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java

@ -203,7 +203,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence @@ -203,7 +203,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
return this.aspectInstanceFactory.getAspectClassLoader();
}
@Override
public int getOrder() {
return this.aspectInstanceFactory.getOrder();
}
@ -213,7 +212,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence @@ -213,7 +212,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
this.aspectName = name;
}
@Override
public String getAspectName() {
return this.aspectName;
}
@ -225,7 +223,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence @@ -225,7 +223,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
this.declarationOrder = order;
}
@Override
public int getDeclarationOrder() {
return this.declarationOrder;
}
@ -681,7 +678,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence @@ -681,7 +678,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
this.adviceMethod = adviceMethod;
}
@Override
public boolean matches(Method method, Class targetClass) {
return !this.adviceMethod.equals(method);
}

2
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java

@ -222,7 +222,6 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov @@ -222,7 +222,6 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
* @param method the target {@link Method}
* @return the parameter names
*/
@Override
public String[] getParameterNames(Method method) {
this.argumentTypes = method.getParameterTypes();
this.numberOfRemainingUnboundArguments = this.argumentTypes.length;
@ -310,7 +309,6 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov @@ -310,7 +309,6 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
* @throws UnsupportedOperationException if
* {@link #setRaiseExceptions(boolean) raiseExceptions} has been set to {@code true}
*/
@Override
public String[] getParameterNames(Constructor ctor) {
if (this.raiseExceptions) {
throw new UnsupportedOperationException("An advice method can never be a constructor");

3
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java

@ -37,7 +37,6 @@ public class AspectJAfterAdvice extends AbstractAspectJAdvice implements MethodI @@ -37,7 +37,6 @@ public class AspectJAfterAdvice extends AbstractAspectJAdvice implements MethodI
super(aspectJBeforeAdviceMethod, pointcut, aif);
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
try {
return mi.proceed();
@ -47,12 +46,10 @@ public class AspectJAfterAdvice extends AbstractAspectJAdvice implements MethodI @@ -47,12 +46,10 @@ public class AspectJAfterAdvice extends AbstractAspectJAdvice implements MethodI
}
}
@Override
public boolean isBeforeAdvice() {
return false;
}
@Override
public boolean isAfterAdvice() {
return true;
}

3
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterReturningAdvice.java

@ -40,12 +40,10 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice implement @@ -40,12 +40,10 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice implement
super(aspectJBeforeAdviceMethod, pointcut, aif);
}
@Override
public boolean isBeforeAdvice() {
return false;
}
@Override
public boolean isAfterAdvice() {
return true;
}
@ -55,7 +53,6 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice implement @@ -55,7 +53,6 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice implement
setReturningNameNoCheck(name);
}
@Override
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
if (shouldInvokeOnReturnValueOf(method, returnValue)) {
invokeAdviceMethod(getJoinPointMatch(), returnValue, null);

3
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterThrowingAdvice.java

@ -37,12 +37,10 @@ public class AspectJAfterThrowingAdvice extends AbstractAspectJAdvice implements @@ -37,12 +37,10 @@ public class AspectJAfterThrowingAdvice extends AbstractAspectJAdvice implements
super(aspectJBeforeAdviceMethod, pointcut, aif);
}
@Override
public boolean isBeforeAdvice() {
return false;
}
@Override
public boolean isAfterAdvice() {
return true;
}
@ -52,7 +50,6 @@ public class AspectJAfterThrowingAdvice extends AbstractAspectJAdvice implements @@ -52,7 +50,6 @@ public class AspectJAfterThrowingAdvice extends AbstractAspectJAdvice implements
setThrowingNameNoCheck(name);
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
try {
return mi.proceed();

3
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAroundAdvice.java

@ -41,12 +41,10 @@ public class AspectJAroundAdvice extends AbstractAspectJAdvice implements Method @@ -41,12 +41,10 @@ public class AspectJAroundAdvice extends AbstractAspectJAdvice implements Method
super(aspectJAroundAdviceMethod, pointcut, aif);
}
@Override
public boolean isBeforeAdvice() {
return false;
}
@Override
public boolean isAfterAdvice() {
return false;
}
@ -57,7 +55,6 @@ public class AspectJAroundAdvice extends AbstractAspectJAdvice implements Method @@ -57,7 +55,6 @@ public class AspectJAroundAdvice extends AbstractAspectJAdvice implements Method
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
if (!(mi instanceof ProxyMethodInvocation)) {
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);

20
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java

@ -155,19 +155,16 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut @@ -155,19 +155,16 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
this.pointcutParameterTypes = types;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
@Override
public ClassFilter getClassFilter() {
checkReadyToMatch();
return this;
}
@Override
public MethodMatcher getMethodMatcher() {
checkReadyToMatch();
return this;
@ -247,7 +244,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut @@ -247,7 +244,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
return this.pointcutExpression;
}
@Override
public boolean matches(Class targetClass) {
checkReadyToMatch();
try {
@ -271,7 +267,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut @@ -271,7 +267,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
}
}
@Override
public boolean matches(Method method, Class targetClass, boolean beanHasIntroductions) {
checkReadyToMatch();
Method targetMethod = AopUtils.getMostSpecificMethod(method, targetClass);
@ -292,18 +287,15 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut @@ -292,18 +287,15 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
}
}
@Override
public boolean matches(Method method, Class targetClass) {
return matches(method, targetClass, false);
}
@Override
public boolean isRuntime() {
checkReadyToMatch();
return this.pointcutExpression.mayNeedDynamicTest();
}
@Override
public boolean matches(Method method, Class targetClass, Object[] args) {
checkReadyToMatch();
ShadowMatch shadowMatch = getShadowMatch(AopUtils.getMostSpecificMethod(method, targetClass), method);
@ -514,12 +506,10 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut @@ -514,12 +506,10 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
private static final String BEAN_DESIGNATOR_NAME = "bean";
@Override
public String getDesignatorName() {
return BEAN_DESIGNATOR_NAME;
}
@Override
public ContextBasedMatcher parse(String expression) {
return new BeanNameContextMatcher(expression);
}
@ -541,27 +531,22 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut @@ -541,27 +531,22 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
this.expressionPattern = new NamePattern(expression);
}
@Override
public boolean couldMatchJoinPointsInType(Class someClass) {
return (contextMatch(someClass) == FuzzyBoolean.YES);
}
@Override
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
return (contextMatch(someClass) == FuzzyBoolean.YES);
}
@Override
public boolean matchesDynamically(MatchingContext context) {
return true;
}
@Override
public FuzzyBoolean matchesStatically(MatchingContext context) {
return contextMatch(null);
}
@Override
public boolean mayNeedDynamicTest() {
return false;
}
@ -626,22 +611,18 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut @@ -626,22 +611,18 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
this.other = other;
}
@Override
public boolean alwaysMatches() {
return primary.alwaysMatches();
}
@Override
public boolean maybeMatches() {
return primary.maybeMatches();
}
@Override
public boolean neverMatches() {
return primary.neverMatches();
}
@Override
public JoinPointMatch matchesJoinPoint(Object thisObject,
Object targetObject, Object[] args) {
try {
@ -651,7 +632,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut @@ -651,7 +632,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
}
}
@Override
public void setMatchingContext(MatchingContext aMatchContext) {
primary.setMatchingContext(aMatchContext);
other.setMatchingContext(aMatchContext);

1
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java

@ -31,7 +31,6 @@ public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdv @@ -31,7 +31,6 @@ public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdv
private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
@Override
public Pointcut getPointcut() {
return this.pointcut;
}

3
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJMethodBeforeAdvice.java

@ -35,17 +35,14 @@ public class AspectJMethodBeforeAdvice extends AbstractAspectJAdvice implements @@ -35,17 +35,14 @@ public class AspectJMethodBeforeAdvice extends AbstractAspectJAdvice implements
super(aspectJBeforeAdviceMethod, pointcut, aif);
}
@Override
public void before(Method method, Object[] args, Object target) throws Throwable {
invokeAdviceMethod(getJoinPointMatch(), null, null);
}
@Override
public boolean isBeforeAdvice() {
return true;
}
@Override
public boolean isAfterAdvice() {
return false;
}

4
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java

@ -56,22 +56,18 @@ public class AspectJPointcutAdvisor implements PointcutAdvisor, Ordered { @@ -56,22 +56,18 @@ public class AspectJPointcutAdvisor implements PointcutAdvisor, Ordered {
}
@Override
public boolean isPerInstance() {
return true;
}
@Override
public Advice getAdvice() {
return this.advice;
}
@Override
public Pointcut getPointcut() {
return this.pointcut;
}
@Override
public int getOrder() {
if (this.order != null) {
return this.order;

4
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java

@ -48,7 +48,6 @@ public class AspectJWeaverMessageHandler implements IMessageHandler { @@ -48,7 +48,6 @@ public class AspectJWeaverMessageHandler implements IMessageHandler {
private static final Log LOGGER = LogFactory.getLog("AspectJ Weaver");
@Override
public boolean handleMessage(IMessage message) throws AbortException {
Kind messageKind = message.getKind();
@ -94,18 +93,15 @@ public class AspectJWeaverMessageHandler implements IMessageHandler { @@ -94,18 +93,15 @@ public class AspectJWeaverMessageHandler implements IMessageHandler {
return AJ_ID + aMessage.getMessage();
}
@Override
public boolean isIgnoring(Kind messageKind) {
// We want to see everything, and allow configuration of log levels dynamically.
return false;
}
@Override
public void dontIgnore(Kind messageKind) {
// We weren't ignoring anything anyway...
}
@Override
public void ignore(Kind kind) {
// We weren't ignoring anything anyway...
}

6
spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java

@ -77,7 +77,6 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor { @@ -77,7 +77,6 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor {
// Excludes methods implemented.
ClassFilter exclusion = new ClassFilter() {
@Override
public boolean matches(Class clazz) {
return !(introducedInterface.isAssignableFrom(clazz));
}
@ -88,27 +87,22 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor { @@ -88,27 +87,22 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor {
}
@Override
public ClassFilter getClassFilter() {
return this.typePatternClassFilter;
}
@Override
public void validateInterfaces() throws IllegalArgumentException {
// Do nothing
}
@Override
public boolean isPerInstance() {
return true;
}
@Override
public Advice getAdvice() {
return this.advice;
}
@Override
public Class[] getInterfaces() {
return new Class[] {this.introducedInterface};
}

28
spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java

@ -72,17 +72,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -72,17 +72,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
this.methodInvocation = methodInvocation;
}
@Override
public void set$AroundClosure(AroundClosure aroundClosure) {
throw new UnsupportedOperationException();
}
@Override
public Object proceed() throws Throwable {
return this.methodInvocation.invocableClone().proceed();
}
@Override
public Object proceed(Object[] arguments) throws Throwable {
Assert.notNull(arguments, "Argument array passed to proceed cannot be null");
if (arguments.length != this.methodInvocation.getArguments().length) {
@ -97,7 +94,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -97,7 +94,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
/**
* Returns the Spring AOP proxy. Cannot be {@code null}.
*/
@Override
public Object getThis() {
return this.methodInvocation.getProxy();
}
@ -105,12 +101,10 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -105,12 +101,10 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
/**
* Returns the Spring AOP target. May be {@code null} if there is no target.
*/
@Override
public Object getTarget() {
return this.methodInvocation.getThis();
}
@Override
public Object[] getArgs() {
if (this.defensiveCopyOfArgs == null) {
Object[] argsSource = this.methodInvocation.getArguments();
@ -120,7 +114,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -120,7 +114,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
return this.defensiveCopyOfArgs;
}
@Override
public Signature getSignature() {
if (this.signature == null) {
this.signature = new MethodSignatureImpl();
@ -128,7 +121,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -128,7 +121,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
return signature;
}
@Override
public SourceLocation getSourceLocation() {
if (this.sourceLocation == null) {
this.sourceLocation = new SourceLocationImpl();
@ -136,28 +128,23 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -136,28 +128,23 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
return this.sourceLocation;
}
@Override
public String getKind() {
return ProceedingJoinPoint.METHOD_EXECUTION;
}
@Override
public int getId() {
// TODO: It's just an adapter but returning 0 might still have side effects...
return 0;
}
@Override
public JoinPoint.StaticPart getStaticPart() {
return this;
}
@Override
public String toShortString() {
return "execution(" + getSignature().toShortString() + ")";
}
@Override
public String toLongString() {
return "execution(" + getSignature().toLongString() + ")";
}
@ -174,42 +161,34 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -174,42 +161,34 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
private volatile String[] parameterNames;
@Override
public String getName() {
return methodInvocation.getMethod().getName();
}
@Override
public int getModifiers() {
return methodInvocation.getMethod().getModifiers();
}
@Override
public Class getDeclaringType() {
return methodInvocation.getMethod().getDeclaringClass();
}
@Override
public String getDeclaringTypeName() {
return methodInvocation.getMethod().getDeclaringClass().getName();
}
@Override
public Class getReturnType() {
return methodInvocation.getMethod().getReturnType();
}
@Override
public Method getMethod() {
return methodInvocation.getMethod();
}
@Override
public Class[] getParameterTypes() {
return methodInvocation.getMethod().getParameterTypes();
}
@Override
public String[] getParameterNames() {
if (this.parameterNames == null) {
this.parameterNames = (new LocalVariableTableParameterNameDiscoverer()).getParameterNames(getMethod());
@ -217,17 +196,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -217,17 +196,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
return this.parameterNames;
}
@Override
public Class[] getExceptionTypes() {
return methodInvocation.getMethod().getExceptionTypes();
}
@Override
public String toShortString() {
return toString(false, false, false, false);
}
@Override
public String toLongString() {
return toString(true, true, true, true);
}
@ -291,7 +267,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -291,7 +267,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
*/
private class SourceLocationImpl implements SourceLocation {
@Override
public Class getWithinType() {
if (methodInvocation.getThis() == null) {
throw new UnsupportedOperationException("No source location joinpoint available: target is null");
@ -299,17 +274,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -299,17 +274,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
return methodInvocation.getThis().getClass();
}
@Override
public String getFileName() {
throw new UnsupportedOperationException();
}
@Override
public int getLine() {
throw new UnsupportedOperationException();
}
@Override
public int getColumn() {
throw new UnsupportedOperationException();
}

9
spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java

@ -106,44 +106,35 @@ class RuntimeTestWalker { @@ -106,44 +106,35 @@ class RuntimeTestWalker {
protected static final int AT_TARGET_VAR = 4;
protected static final int AT_ANNOTATION_VAR = 8;
@Override
public void visit(And e) {
e.getLeft().accept(this);
e.getRight().accept(this);
}
@Override
public void visit(Or e) {
e.getLeft().accept(this);
e.getRight().accept(this);
}
@Override
public void visit(Not e) {
e.getBody().accept(this);
}
@Override
public void visit(Instanceof i) {
}
@Override
public void visit(Literal literal) {
}
@Override
public void visit(Call call) {
}
@Override
public void visit(FieldGetCall fieldGetCall) {
}
@Override
public void visit(HasAnnotation hasAnnotation) {
}
@Override
public void visit(MatchingContextBasedTest matchingContextTest) {
}

3
spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java

@ -49,7 +49,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory { @@ -49,7 +49,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory {
}
@Override
public final Object getAspectInstance() {
try {
return this.aspectClass.newInstance();
@ -62,7 +61,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory { @@ -62,7 +61,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory {
}
}
@Override
public ClassLoader getAspectClassLoader() {
return this.aspectClass.getClassLoader();
}
@ -75,7 +73,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory { @@ -75,7 +73,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory {
* @see org.springframework.core.Ordered
* @see #getOrderForAspectClass
*/
@Override
public int getOrder() {
return getOrderForAspectClass(this.aspectClass);
}

3
spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java

@ -44,12 +44,10 @@ public class SingletonAspectInstanceFactory implements AspectInstanceFactory { @@ -44,12 +44,10 @@ public class SingletonAspectInstanceFactory implements AspectInstanceFactory {
}
@Override
public final Object getAspectInstance() {
return this.aspectInstance;
}
@Override
public ClassLoader getAspectClassLoader() {
return this.aspectInstance.getClass().getClassLoader();
}
@ -62,7 +60,6 @@ public class SingletonAspectInstanceFactory implements AspectInstanceFactory { @@ -62,7 +60,6 @@ public class SingletonAspectInstanceFactory implements AspectInstanceFactory {
* @see org.springframework.core.Ordered
* @see #getOrderForAspectClass
*/
@Override
public int getOrder() {
if (this.aspectInstance instanceof Ordered) {
return ((Ordered) this.aspectInstance).getOrder();

1
spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java

@ -93,7 +93,6 @@ public class TypePatternClassFilter implements ClassFilter { @@ -93,7 +93,6 @@ public class TypePatternClassFilter implements ClassFilter {
* @return whether the advice should apply to this candidate target class
* @throws IllegalStateException if no {@link #setTypePattern(String)} has been set
*/
@Override
public boolean matches(Class clazz) {
if (this.aspectJTypePatternMatcher == null) {
throw new IllegalStateException("No 'typePattern' has been set via ctor/setter.");

4
spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java

@ -111,7 +111,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac @@ -111,7 +111,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
* is that aspects written in the code-style (AspectJ language) also have the annotation present
* when compiled by ajc with the -1.5 flag, yet they cannot be consumed by Spring AOP.
*/
@Override
public boolean isAspect(Class<?> clazz) {
return (hasAspectAnnotation(clazz) && !compiledByAjc(clazz));
}
@ -136,7 +135,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac @@ -136,7 +135,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
return false;
}
@Override
public void validate(Class<?> aspectClass) throws AopConfigException {
// If the parent has the annotation and isn't abstract it's an error
if (aspectClass.getSuperclass().getAnnotation(Aspect.class) != null &&
@ -311,7 +309,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac @@ -311,7 +309,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
*/
private static class AspectJAnnotationParameterNameDiscoverer implements ParameterNameDiscoverer {
@Override
public String[] getParameterNames(Method method) {
if (method.getParameterTypes().length == 0) {
return new String[0];
@ -333,7 +330,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac @@ -333,7 +330,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
}
}
@Override
public String[] getParameterNames(Constructor ctor) {
throw new UnsupportedOperationException("Spring AOP cannot handle constructor advice");
}

4
spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java

@ -72,12 +72,10 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst @@ -72,12 +72,10 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst
}
@Override
public Object getAspectInstance() {
return this.beanFactory.getBean(this.name);
}
@Override
public ClassLoader getAspectClassLoader() {
if (this.beanFactory instanceof ConfigurableBeanFactory) {
return ((ConfigurableBeanFactory) this.beanFactory).getBeanClassLoader();
@ -87,7 +85,6 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst @@ -87,7 +85,6 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst
}
}
@Override
public AspectMetadata getAspectMetadata() {
return this.aspectMetadata;
}
@ -102,7 +99,6 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst @@ -102,7 +99,6 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst
* @see org.springframework.core.Ordered
* @see org.springframework.core.annotation.Order
*/
@Override
public int getOrder() {
Class<?> type = this.beanFactory.getType(this.name);
if (type != null) {

11
spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java

@ -97,7 +97,6 @@ class InstantiationModelAwarePointcutAdvisorImpl @@ -97,7 +97,6 @@ class InstantiationModelAwarePointcutAdvisorImpl
* The pointcut for Spring AOP to use. Actual behaviour of the pointcut will change
* depending on the state of the advice.
*/
@Override
public Pointcut getPointcut() {
return this.pointcut;
}
@ -107,7 +106,6 @@ class InstantiationModelAwarePointcutAdvisorImpl @@ -107,7 +106,6 @@ class InstantiationModelAwarePointcutAdvisorImpl
* are much richer. In AspectJ terminology, all a return of {@code true}
* means here is that the aspect is not a SINGLETON.
*/
@Override
public boolean isPerInstance() {
return (getAspectMetadata().getAjType().getPerClause().getKind() != PerClauseKind.SINGLETON);
}
@ -122,7 +120,6 @@ class InstantiationModelAwarePointcutAdvisorImpl @@ -122,7 +120,6 @@ class InstantiationModelAwarePointcutAdvisorImpl
/**
* Lazily instantiate advice if necessary.
*/
@Override
public synchronized Advice getAdvice() {
if (this.instantiatedAdvice == null) {
this.instantiatedAdvice = instantiateAdvice(this.declaredPointcut);
@ -130,12 +127,10 @@ class InstantiationModelAwarePointcutAdvisorImpl @@ -130,12 +127,10 @@ class InstantiationModelAwarePointcutAdvisorImpl
return this.instantiatedAdvice;
}
@Override
public boolean isLazy() {
return this.lazy;
}
@Override
public synchronized boolean isAdviceInstantiated() {
return (this.instantiatedAdvice != null);
}
@ -154,22 +149,18 @@ class InstantiationModelAwarePointcutAdvisorImpl @@ -154,22 +149,18 @@ class InstantiationModelAwarePointcutAdvisorImpl
return this.declaredPointcut;
}
@Override
public int getOrder() {
return this.aspectInstanceFactory.getOrder();
}
@Override
public String getAspectName() {
return this.aspectName;
}
@Override
public int getDeclarationOrder() {
return this.declarationOrder;
}
@Override
public boolean isBeforeAdvice() {
if (this.isBeforeAdvice == null) {
determineAdviceType();
@ -177,7 +168,6 @@ class InstantiationModelAwarePointcutAdvisorImpl @@ -177,7 +168,6 @@ class InstantiationModelAwarePointcutAdvisorImpl
return this.isBeforeAdvice;
}
@Override
public boolean isAfterAdvice() {
if (this.isAfterAdvice == null) {
determineAdviceType();
@ -255,7 +245,6 @@ class InstantiationModelAwarePointcutAdvisorImpl @@ -255,7 +245,6 @@ class InstantiationModelAwarePointcutAdvisorImpl
this.preInstantiationPointcut.getMethodMatcher().matches(method, targetClass);
}
@Override
public boolean matches(Method method, Class targetClass, Object[] args) {
// This can match only on declared pointcut.
return (isAspectMaterialized() && this.declaredPointcut.matches(method, targetClass));

4
spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/LazySingletonAspectInstanceFactoryDecorator.java

@ -42,7 +42,6 @@ public class LazySingletonAspectInstanceFactoryDecorator implements MetadataAwar @@ -42,7 +42,6 @@ public class LazySingletonAspectInstanceFactoryDecorator implements MetadataAwar
}
@Override
public synchronized Object getAspectInstance() {
if (this.materialized == null) {
synchronized (this) {
@ -58,17 +57,14 @@ public class LazySingletonAspectInstanceFactoryDecorator implements MetadataAwar @@ -58,17 +57,14 @@ public class LazySingletonAspectInstanceFactoryDecorator implements MetadataAwar
return (this.materialized != null);
}
@Override
public ClassLoader getAspectClassLoader() {
return this.maaif.getAspectClassLoader();
}
@Override
public AspectMetadata getAspectMetadata() {
return this.maaif.getAspectMetadata();
}
@Override
public int getOrder() {
return this.maaif.getOrder();
}

7
spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java

@ -75,7 +75,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto @@ -75,7 +75,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
new InstanceComparator<Annotation>(
Around.class, Before.class, After.class, AfterReturning.class, AfterThrowing.class),
new Converter<Method, Annotation>() {
@Override
public Annotation convert(Method method) {
AspectJAnnotation<?> annotation = AbstractAspectJAdvisorFactory.findAspectJAnnotationOnMethod(method);
return annotation == null ? null : annotation.getAnnotation();
@ -83,7 +82,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto @@ -83,7 +82,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
}));
comparator.addComparator(new ConvertingComparator<Method, String>(
new Converter<Method, String>() {
@Override
public String convert(Method method) {
return method.getName();
}
@ -92,7 +90,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto @@ -92,7 +90,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
}
@Override
public List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory maaif) {
final Class<?> aspectClass = maaif.getAspectMetadata().getAspectClass();
final String aspectName = maaif.getAspectMetadata().getAspectName();
@ -131,7 +128,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto @@ -131,7 +128,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
private List<Method> getAdvisorMethods(Class<?> aspectClass) {
final List<Method> methods = new LinkedList<Method>();
ReflectionUtils.doWithMethods(aspectClass, new ReflectionUtils.MethodCallback() {
@Override
public void doWith(Method method) throws IllegalArgumentException {
// Exclude pointcuts
if (AnnotationUtils.getAnnotation(method, Pointcut.class) == null) {
@ -168,7 +164,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto @@ -168,7 +164,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
}
@Override
public Advisor getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aif,
int declarationOrderInAspect, String aspectName) {
@ -196,7 +191,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto @@ -196,7 +191,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
}
@Override
public Advice getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut ajexp,
MetadataAwareAspectInstanceFactory aif, int declarationOrderInAspect, String aspectName) {
@ -278,7 +272,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto @@ -278,7 +272,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
public SyntheticInstantiationAdvisor(final MetadataAwareAspectInstanceFactory aif) {
super(aif.getAspectMetadata().getPerClausePointcut(), new MethodBeforeAdvice() {
@Override
public void before(Method method, Object[] args, Object target) {
// Simply instantiate the aspect
aif.getAspectInstance();

1
spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java

@ -45,7 +45,6 @@ public class SimpleMetadataAwareAspectInstanceFactory extends SimpleAspectInstan @@ -45,7 +45,6 @@ public class SimpleMetadataAwareAspectInstanceFactory extends SimpleAspectInstan
}
@Override
public final AspectMetadata getAspectMetadata() {
return this.metadata;
}

1
spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java

@ -47,7 +47,6 @@ public class SingletonMetadataAwareAspectInstanceFactory extends SingletonAspect @@ -47,7 +47,6 @@ public class SingletonMetadataAwareAspectInstanceFactory extends SingletonAspect
}
@Override
public final AspectMetadata getAspectMetadata() {
return this.metadata;
}

2
spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java

@ -131,13 +131,11 @@ public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProx @@ -131,13 +131,11 @@ public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProx
this.comparator = comparator;
}
@Override
public int compareTo(Object obj) {
Advisor otherAdvisor = ((PartiallyComparableAdvisorHolder) obj).advisor;
return this.comparator.compare(this.advisor, otherAdvisor);
}
@Override
public int fallbackCompareTo(Object obj) {
return 0;
}

1
spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java

@ -76,7 +76,6 @@ class AspectJPrecedenceComparator implements Comparator { @@ -76,7 +76,6 @@ class AspectJPrecedenceComparator implements Comparator {
}
@Override
public int compare(Object o1, Object o2) {
if (!(o1 instanceof Advisor && o2 instanceof Advisor)) {
throw new IllegalArgumentException(

1
spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java

@ -58,7 +58,6 @@ import org.springframework.util.StringUtils; @@ -58,7 +58,6 @@ import org.springframework.util.StringUtils;
*/
public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator implements BeanDefinitionDecorator {
@Override
public final BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definitionHolder, ParserContext parserContext) {
BeanDefinitionRegistry registry = parserContext.getRegistry();

2
spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java

@ -91,7 +91,6 @@ public class AdvisorComponentDefinition extends AbstractComponentDefinition { @@ -91,7 +91,6 @@ public class AdvisorComponentDefinition extends AbstractComponentDefinition {
}
@Override
public String getName() {
return this.advisorBeanName;
}
@ -111,7 +110,6 @@ public class AdvisorComponentDefinition extends AbstractComponentDefinition { @@ -111,7 +110,6 @@ public class AdvisorComponentDefinition extends AbstractComponentDefinition {
return this.beanReferences;
}
@Override
public Object getSource() {
return this.advisorDefinition.getSource();
}

1
spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java

@ -59,7 +59,6 @@ public class AopNamespaceHandler extends NamespaceHandlerSupport { @@ -59,7 +59,6 @@ public class AopNamespaceHandler extends NamespaceHandlerSupport {
* '{@code config}', '{@code spring-configured}', '{@code aspectj-autoproxy}'
* and '{@code scoped-proxy}' tags.
*/
@Override
public void init() {
// In 2.0 XSD as well as in 2.1 XSD.
registerBeanDefinitionParser("config", new ConfigBeanDefinitionParser());

1
spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java

@ -37,7 +37,6 @@ import org.springframework.beans.factory.xml.ParserContext; @@ -37,7 +37,6 @@ import org.springframework.beans.factory.xml.ParserContext;
*/
class AspectJAutoProxyBeanDefinitionParser implements BeanDefinitionParser {
@Override
public BeanDefinition parse(Element element, ParserContext parserContext) {
AopNamespaceUtils.registerAspectJAnnotationAutoProxyCreatorIfNecessary(parserContext, element);
extendBeanDefinition(element, parserContext);

1
spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java

@ -95,7 +95,6 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser { @@ -95,7 +95,6 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
private ParseState parseState = new ParseState();
@Override
public BeanDefinition parse(Element element, ParserContext parserContext) {
CompositeComponentDefinition compositeDef =
new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element));

4
spring-aop/src/main/java/org/springframework/aop/config/MethodLocatingFactoryBean.java

@ -57,7 +57,6 @@ public class MethodLocatingFactoryBean implements FactoryBean<Method>, BeanFacto @@ -57,7 +57,6 @@ public class MethodLocatingFactoryBean implements FactoryBean<Method>, BeanFacto
this.methodName = methodName;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
if (!StringUtils.hasText(this.targetBeanName)) {
throw new IllegalArgumentException("Property 'targetBeanName' is required");
@ -79,17 +78,14 @@ public class MethodLocatingFactoryBean implements FactoryBean<Method>, BeanFacto @@ -79,17 +78,14 @@ public class MethodLocatingFactoryBean implements FactoryBean<Method>, BeanFacto
}
@Override
public Method getObject() throws Exception {
return this.method;
}
@Override
public Class<Method> getObjectType() {
return Method.class;
}
@Override
public boolean isSingleton() {
return true;
}

2
spring-aop/src/main/java/org/springframework/aop/config/PointcutComponentDefinition.java

@ -46,7 +46,6 @@ public class PointcutComponentDefinition extends AbstractComponentDefinition { @@ -46,7 +46,6 @@ public class PointcutComponentDefinition extends AbstractComponentDefinition {
}
@Override
public String getName() {
return this.pointcutBeanName;
}
@ -61,7 +60,6 @@ public class PointcutComponentDefinition extends AbstractComponentDefinition { @@ -61,7 +60,6 @@ public class PointcutComponentDefinition extends AbstractComponentDefinition {
return new BeanDefinition[] {this.pointcutDefinition};
}
@Override
public Object getSource() {
return this.pointcutDefinition.getSource();
}

1
spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java

@ -39,7 +39,6 @@ class ScopedProxyBeanDefinitionDecorator implements BeanDefinitionDecorator { @@ -39,7 +39,6 @@ class ScopedProxyBeanDefinitionDecorator implements BeanDefinitionDecorator {
private static final String PROXY_TARGET_CLASS = "proxy-target-class";
@Override
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) {
boolean proxyTargetClass = true;
if (node instanceof Element) {

4
spring-aop/src/main/java/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.java

@ -47,7 +47,6 @@ public class SimpleBeanFactoryAwareAspectInstanceFactory implements AspectInstan @@ -47,7 +47,6 @@ public class SimpleBeanFactoryAwareAspectInstanceFactory implements AspectInstan
this.aspectBeanName = aspectBeanName;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
if (!StringUtils.hasText(this.aspectBeanName)) {
@ -60,12 +59,10 @@ public class SimpleBeanFactoryAwareAspectInstanceFactory implements AspectInstan @@ -60,12 +59,10 @@ public class SimpleBeanFactoryAwareAspectInstanceFactory implements AspectInstan
* Look up the aspect bean from the {@link BeanFactory} and returns it.
* @see #setAspectBeanName
*/
@Override
public Object getAspectInstance() {
return this.beanFactory.getBean(this.aspectBeanName);
}
@Override
public ClassLoader getAspectClassLoader() {
if (this.beanFactory instanceof ConfigurableBeanFactory) {
return ((ConfigurableBeanFactory) this.beanFactory).getBeanClassLoader();
@ -75,7 +72,6 @@ public class SimpleBeanFactoryAwareAspectInstanceFactory implements AspectInstan @@ -75,7 +72,6 @@ public class SimpleBeanFactoryAwareAspectInstanceFactory implements AspectInstan
}
}
@Override
public int getOrder() {
if (this.beanFactory.isSingleton(this.aspectBeanName) &&
this.beanFactory.isTypeMatch(this.aspectBeanName, Ordered.class)) {

1
spring-aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java

@ -50,7 +50,6 @@ class SpringConfiguredBeanDefinitionParser implements BeanDefinitionParser { @@ -50,7 +50,6 @@ class SpringConfiguredBeanDefinitionParser implements BeanDefinitionParser {
"org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect";
@Override
public BeanDefinition parse(Element element, ParserContext parserContext) {
if (!parserContext.getRegistry().containsBeanDefinition(BEAN_CONFIGURER_ASPECT_BEAN_NAME)) {
RootBeanDefinition def = new RootBeanDefinition();

4
spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java

@ -50,7 +50,6 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig @@ -50,7 +50,6 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig
private final Map<String, Boolean> eligibleBeans = new ConcurrentHashMap<String, Boolean>(64);
@Override
public void setBeanClassLoader(ClassLoader beanClassLoader) {
this.beanClassLoader = beanClassLoader;
}
@ -59,18 +58,15 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig @@ -59,18 +58,15 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) {
return bean;
}
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) {
if (bean instanceof AopInfrastructureBean) {
// Ignore AOP infrastructure such as scoped proxies.

5
spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java

@ -122,7 +122,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig @@ -122,7 +122,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig
this.proxyClassLoader = classLoader;
}
@Override
public void setBeanClassLoader(ClassLoader classLoader) {
if (this.proxyClassLoader == null) {
this.proxyClassLoader = classLoader;
@ -130,7 +129,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig @@ -130,7 +129,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig
}
@Override
public void afterPropertiesSet() {
if (this.target == null) {
throw new IllegalArgumentException("Property 'target' is required");
@ -192,7 +190,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig @@ -192,7 +190,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig
}
@Override
public Object getObject() {
if (this.proxy == null) {
throw new FactoryBeanNotInitializedException();
@ -200,7 +197,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig @@ -200,7 +197,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig
return this.proxy;
}
@Override
public Class<?> getObjectType() {
if (this.proxy != null) {
return this.proxy.getClass();
@ -217,7 +213,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig @@ -217,7 +213,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig
return null;
}
@Override
public final boolean isSingleton() {
return true;
}

19
spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java

@ -137,12 +137,10 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -137,12 +137,10 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
setTargetSource(new SingletonTargetSource(target));
}
@Override
public void setTargetSource(TargetSource targetSource) {
this.targetSource = (targetSource != null ? targetSource : EMPTY_TARGET_SOURCE);
}
@Override
public TargetSource getTargetSource() {
return this.targetSource;
}
@ -164,17 +162,14 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -164,17 +162,14 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
this.targetSource = EmptyTargetSource.forClass(targetClass);
}
@Override
public Class<?> getTargetClass() {
return this.targetSource.getTargetClass();
}
@Override
public void setPreFiltered(boolean preFiltered) {
this.preFiltered = preFiltered;
}
@Override
public boolean isPreFiltered() {
return this.preFiltered;
}
@ -233,12 +228,10 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -233,12 +228,10 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
return this.interfaces.remove(intf);
}
@Override
public Class[] getProxiedInterfaces() {
return this.interfaces.toArray(new Class[this.interfaces.size()]);
}
@Override
public boolean isInterfaceProxied(Class intf) {
for (Class proxyIntf : this.interfaces) {
if (intf.isAssignableFrom(proxyIntf)) {
@ -249,18 +242,15 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -249,18 +242,15 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
}
@Override
public final Advisor[] getAdvisors() {
return this.advisorArray;
}
@Override
public void addAdvisor(Advisor advisor) {
int pos = this.advisors.size();
addAdvisor(pos, advisor);
}
@Override
public void addAdvisor(int pos, Advisor advisor) throws AopConfigException {
if (advisor instanceof IntroductionAdvisor) {
validateIntroductionAdvisor((IntroductionAdvisor) advisor);
@ -268,7 +258,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -268,7 +258,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
addAdvisorInternal(pos, advisor);
}
@Override
public boolean removeAdvisor(Advisor advisor) {
int index = indexOf(advisor);
if (index == -1) {
@ -280,7 +269,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -280,7 +269,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
}
}
@Override
public void removeAdvisor(int index) throws AopConfigException {
if (isFrozen()) {
throw new AopConfigException("Cannot remove Advisor: Configuration is frozen.");
@ -304,13 +292,11 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -304,13 +292,11 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
adviceChanged();
}
@Override
public int indexOf(Advisor advisor) {
Assert.notNull(advisor, "Advisor must not be null");
return this.advisors.indexOf(advisor);
}
@Override
public boolean replaceAdvisor(Advisor a, Advisor b) throws AopConfigException {
Assert.notNull(a, "Advisor a must not be null");
Assert.notNull(b, "Advisor b must not be null");
@ -402,7 +388,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -402,7 +388,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
}
@Override
public void addAdvice(Advice advice) throws AopConfigException {
int pos = this.advisors.size();
addAdvice(pos, advice);
@ -411,7 +396,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -411,7 +396,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
/**
* Cannot add introductions this way unless the advice implements IntroductionInfo.
*/
@Override
public void addAdvice(int pos, Advice advice) throws AopConfigException {
Assert.notNull(advice, "Advice must not be null");
if (advice instanceof IntroductionInfo) {
@ -428,7 +412,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -428,7 +412,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
}
}
@Override
public boolean removeAdvice(Advice advice) throws AopConfigException {
int index = indexOf(advice);
if (index == -1) {
@ -440,7 +423,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -440,7 +423,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
}
}
@Override
public int indexOf(Advice advice) {
Assert.notNull(advice, "Advice must not be null");
for (int i = 0; i < this.advisors.size(); i++) {
@ -572,7 +554,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -572,7 +554,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
}
@Override
public String toProxyConfigString() {
return toString();
}

13
spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java

@ -146,12 +146,10 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -146,12 +146,10 @@ final class CglibAopProxy implements AopProxy, Serializable {
}
@Override
public Object getProxy() {
return getProxy(null);
}
@Override
public Object getProxy(ClassLoader classLoader) {
if (logger.isDebugEnabled()) {
logger.debug("Creating CGLIB proxy: target source is " + this.advised.getTargetSource());
@ -388,7 +386,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -388,7 +386,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.target = target;
}
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
Object retVal = methodProxy.invoke(this.target, args);
return processReturnType(proxy, this.target, method, retVal);
@ -408,7 +405,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -408,7 +405,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.target = target;
}
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
Object oldProxy = null;
try {
@ -436,7 +432,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -436,7 +432,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.targetSource = targetSource;
}
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
Object target = this.targetSource.getTarget();
try {
@ -461,7 +456,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -461,7 +456,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.targetSource = targetSource;
}
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
Object oldProxy = null;
Object target = this.targetSource.getTarget();
@ -491,7 +485,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -491,7 +485,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.target = target;
}
@Override
public Object loadObject() {
return this.target;
}
@ -509,7 +502,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -509,7 +502,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.advised = advised;
}
@Override
public Object loadObject() throws Exception {
return this.advised;
}
@ -528,7 +520,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -528,7 +520,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.advised = advised;
}
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) {
Object other = args[0];
if (proxy == other) {
@ -561,7 +552,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -561,7 +552,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.advised = advised;
}
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) {
return CglibAopProxy.class.hashCode() * 13 + this.advised.getTargetSource().hashCode();
}
@ -585,7 +575,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -585,7 +575,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.targetClass = targetClass;
}
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
MethodInvocation invocation = new CglibMethodInvocation(proxy, this.target, method, args,
this.targetClass, this.adviceChain, methodProxy);
@ -609,7 +598,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -609,7 +598,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
this.advised = advised;
}
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
Object oldProxy = null;
boolean setProxyContext = false;
@ -766,7 +754,6 @@ final class CglibAopProxy implements AopProxy, Serializable { @@ -766,7 +754,6 @@ final class CglibAopProxy implements AopProxy, Serializable {
* DynamicUnadvisedInterceptor already considers this.</dd>
* </dl>
*/
@Override
public int accept(Method method) {
if (AopUtils.isFinalizeMethod(method)) {
logger.debug("Found finalize() method - using NO_OVERRIDE");

1
spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java

@ -46,7 +46,6 @@ import org.springframework.aop.support.MethodMatchers; @@ -46,7 +46,6 @@ import org.springframework.aop.support.MethodMatchers;
@SuppressWarnings("serial")
public class DefaultAdvisorChainFactory implements AdvisorChainFactory, Serializable {
@Override
public List<Object> getInterceptorsAndDynamicInterceptionAdvice(
Advised config, Method method, Class targetClass) {

1
spring-aop/src/main/java/org/springframework/aop/framework/DefaultAopProxyFactory.java

@ -49,7 +49,6 @@ import org.springframework.aop.SpringProxy; @@ -49,7 +49,6 @@ import org.springframework.aop.SpringProxy;
public class DefaultAopProxyFactory implements AopProxyFactory, Serializable {
@Override
public AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException {
if (config.isOptimize() || config.isProxyTargetClass() || hasNoUserSuppliedProxyInterfaces(config)) {
Class targetClass = config.getTargetClass();

3
spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java

@ -106,12 +106,10 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa @@ -106,12 +106,10 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa
}
@Override
public Object getProxy() {
return getProxy(ClassUtils.getDefaultClassLoader());
}
@Override
public Object getProxy(ClassLoader classLoader) {
if (logger.isDebugEnabled()) {
logger.debug("Creating JDK dynamic proxy: target source is " + this.advised.getTargetSource());
@ -149,7 +147,6 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa @@ -149,7 +147,6 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa
* <p>Callers will see exactly the exception thrown by the target,
* unless a hook method throws an exception.
*/
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
MethodInvocation invocation;
Object oldProxy = null;

7
spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java

@ -218,14 +218,12 @@ public class ProxyFactoryBean extends ProxyCreatorSupport @@ -218,14 +218,12 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
this.classLoaderConfigured = (classLoader != null);
}
@Override
public void setBeanClassLoader(ClassLoader classLoader) {
if (!this.classLoaderConfigured) {
this.proxyClassLoader = classLoader;
}
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
checkInterceptorNames();
@ -239,7 +237,6 @@ public class ProxyFactoryBean extends ProxyCreatorSupport @@ -239,7 +237,6 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
* {@code getObject()} for a proxy.
* @return a fresh AOP proxy reflecting the current state of this factory
*/
@Override
public Object getObject() throws BeansException {
initializeAdvisorChain();
if (isSingleton()) {
@ -260,7 +257,6 @@ public class ProxyFactoryBean extends ProxyCreatorSupport @@ -260,7 +257,6 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
* a single one), the target bean type, or the TargetSource's target class.
* @see org.springframework.aop.TargetSource#getTargetClass
*/
@Override
public Class<?> getObjectType() {
synchronized (this) {
if (this.singletonInstance != null) {
@ -282,7 +278,6 @@ public class ProxyFactoryBean extends ProxyCreatorSupport @@ -282,7 +278,6 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
}
}
@Override
public boolean isSingleton() {
return this.singleton;
}
@ -643,12 +638,10 @@ public class ProxyFactoryBean extends ProxyCreatorSupport @@ -643,12 +638,10 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
return beanName;
}
@Override
public Advice getAdvice() {
throw new UnsupportedOperationException("Cannot invoke methods: " + this.message);
}
@Override
public boolean isPerInstance() {
throw new UnsupportedOperationException("Cannot invoke methods: " + this.message);
}

11
spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java

@ -114,17 +114,14 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea @@ -114,17 +114,14 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea
}
@Override
public final Object getProxy() {
return this.proxy;
}
@Override
public final Object getThis() {
return this.target;
}
@Override
public final AccessibleObject getStaticPart() {
return this.method;
}
@ -134,23 +131,19 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea @@ -134,23 +131,19 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea
* May or may not correspond with a method invoked on an underlying
* implementation of that interface.
*/
@Override
public final Method getMethod() {
return this.method;
}
@Override
public final Object[] getArguments() {
return (this.arguments != null ? this.arguments : new Object[0]);
}
@Override
public void setArguments(Object[] arguments) {
this.arguments = arguments;
}
@Override
public Object proceed() throws Throwable {
// We start with an index of -1 and increment early.
if (this.currentInterceptorIndex == this.interceptorsAndDynamicMethodMatchers.size() - 1) {
@ -199,7 +192,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea @@ -199,7 +192,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea
* current interceptor index.
* @see java.lang.Object#clone()
*/
@Override
public MethodInvocation invocableClone() {
Object[] cloneArguments = null;
if (this.arguments != null) {
@ -218,7 +210,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea @@ -218,7 +210,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea
* current interceptor index.
* @see java.lang.Object#clone()
*/
@Override
public MethodInvocation invocableClone(Object[] arguments) {
// Force initialization of the user attributes Map,
// for having a shared Map reference in the clone.
@ -239,7 +230,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea @@ -239,7 +230,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea
}
@Override
public void setUserAttribute(String key, Object value) {
if (value != null) {
if (this.userAttributes == null) {
@ -254,7 +244,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea @@ -254,7 +244,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea
}
}
@Override
public Object getUserAttribute(String key) {
return (this.userAttributes != null ? this.userAttributes.get(key) : null);
}

2
spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationManager.java

@ -48,12 +48,10 @@ public class AdvisorAdapterRegistrationManager implements BeanPostProcessor { @@ -48,12 +48,10 @@ public class AdvisorAdapterRegistrationManager implements BeanPostProcessor {
}
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
return bean;
}
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof AdvisorAdapter){
this.advisorAdapterRegistry.registerAdvisorAdapter((AdvisorAdapter) bean);

2
spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceAdapter.java

@ -34,12 +34,10 @@ import org.springframework.aop.AfterReturningAdvice; @@ -34,12 +34,10 @@ import org.springframework.aop.AfterReturningAdvice;
@SuppressWarnings("serial")
class AfterReturningAdviceAdapter implements AdvisorAdapter, Serializable {
@Override
public boolean supportsAdvice(Advice advice) {
return (advice instanceof AfterReturningAdvice);
}
@Override
public MethodInterceptor getInterceptor(Advisor advisor) {
AfterReturningAdvice advice = (AfterReturningAdvice) advisor.getAdvice();
return new AfterReturningAdviceInterceptor(advice);

1
spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceInterceptor.java

@ -47,7 +47,6 @@ public class AfterReturningAdviceInterceptor implements MethodInterceptor, After @@ -47,7 +47,6 @@ public class AfterReturningAdviceInterceptor implements MethodInterceptor, After
this.advice = advice;
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
Object retVal = mi.proceed();
this.advice.afterReturning(retVal, mi.getMethod(), mi.getArguments(), mi.getThis());

3
spring-aop/src/main/java/org/springframework/aop/framework/adapter/DefaultAdvisorAdapterRegistry.java

@ -53,7 +53,6 @@ public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Se @@ -53,7 +53,6 @@ public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Se
}
@Override
public Advisor wrap(Object adviceObject) throws UnknownAdviceTypeException {
if (adviceObject instanceof Advisor) {
return (Advisor) adviceObject;
@ -75,7 +74,6 @@ public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Se @@ -75,7 +74,6 @@ public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Se
throw new UnknownAdviceTypeException(advice);
}
@Override
public MethodInterceptor[] getInterceptors(Advisor advisor) throws UnknownAdviceTypeException {
List<MethodInterceptor> interceptors = new ArrayList<MethodInterceptor>(3);
Advice advice = advisor.getAdvice();
@ -93,7 +91,6 @@ public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Se @@ -93,7 +91,6 @@ public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Se
return interceptors.toArray(new MethodInterceptor[interceptors.size()]);
}
@Override
public void registerAdvisorAdapter(AdvisorAdapter adapter) {
this.adapters.add(adapter);
}

2
spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceAdapter.java

@ -34,12 +34,10 @@ import org.springframework.aop.MethodBeforeAdvice; @@ -34,12 +34,10 @@ import org.springframework.aop.MethodBeforeAdvice;
@SuppressWarnings("serial")
class MethodBeforeAdviceAdapter implements AdvisorAdapter, Serializable {
@Override
public boolean supportsAdvice(Advice advice) {
return (advice instanceof MethodBeforeAdvice);
}
@Override
public MethodInterceptor getInterceptor(Advisor advisor) {
MethodBeforeAdvice advice = (MethodBeforeAdvice) advisor.getAdvice();
return new MethodBeforeAdviceInterceptor(advice);

1
spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceInterceptor.java

@ -46,7 +46,6 @@ public class MethodBeforeAdviceInterceptor implements MethodInterceptor, Seriali @@ -46,7 +46,6 @@ public class MethodBeforeAdviceInterceptor implements MethodInterceptor, Seriali
this.advice = advice;
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
this.advice.before(mi.getMethod(), mi.getArguments(), mi.getThis() );
return mi.proceed();

2
spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceAdapter.java

@ -34,12 +34,10 @@ import org.springframework.aop.ThrowsAdvice; @@ -34,12 +34,10 @@ import org.springframework.aop.ThrowsAdvice;
@SuppressWarnings("serial")
class ThrowsAdviceAdapter implements AdvisorAdapter, Serializable {
@Override
public boolean supportsAdvice(Advice advice) {
return (advice instanceof ThrowsAdvice);
}
@Override
public MethodInterceptor getInterceptor(Advisor advisor) {
return new ThrowsAdviceInterceptor(advisor.getAdvice());
}

1
spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java

@ -119,7 +119,6 @@ public class ThrowsAdviceInterceptor implements MethodInterceptor, AfterAdvice { @@ -119,7 +119,6 @@ public class ThrowsAdviceInterceptor implements MethodInterceptor, AfterAdvice {
return handler;
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
try {
return mi.proceed();

11
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java

@ -155,7 +155,6 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig @@ -155,7 +155,6 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
this.order = order;
}
@Override
public final int getOrder() {
return this.order;
}
@ -233,14 +232,12 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig @@ -233,14 +232,12 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
this.classLoaderConfigured = (classLoader != null);
}
@Override
public void setBeanClassLoader(ClassLoader classLoader) {
if (!this.classLoaderConfigured) {
this.proxyClassLoader = classLoader;
}
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
@ -254,25 +251,21 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig @@ -254,25 +251,21 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
}
@Override
public Class<?> predictBeanType(Class<?> beanClass, String beanName) {
Object cacheKey = getCacheKey(beanClass, beanName);
return this.proxyTypes.get(cacheKey);
}
@Override
public Constructor<?>[] determineCandidateConstructors(Class<?> beanClass, String beanName) throws BeansException {
return null;
}
@Override
public Object getEarlyBeanReference(Object bean, String beanName) throws BeansException {
Object cacheKey = getCacheKey(bean.getClass(), beanName);
this.earlyProxyReferences.put(cacheKey, Boolean.TRUE);
return wrapIfNecessary(bean, beanName, cacheKey);
}
@Override
public Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException {
Object cacheKey = getCacheKey(beanClass, beanName);
@ -303,19 +296,16 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig @@ -303,19 +296,16 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
return null;
}
@Override
public boolean postProcessAfterInstantiation(Object bean, String beanName) {
return true;
}
@Override
public PropertyValues postProcessPropertyValues(
PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) {
return pvs;
}
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) {
return bean;
}
@ -325,7 +315,6 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig @@ -325,7 +315,6 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
* identified as one to proxy by the subclass.
* @see #getAdvicesAndAdvisorsForBean
*/
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean != null) {
Object cacheKey = getCacheKey(bean.getClass(), beanName);

1
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java

@ -79,7 +79,6 @@ public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCrea @@ -79,7 +79,6 @@ public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCrea
return this.advisorBeanNamePrefix;
}
@Override
public void setBeanName(String name) {
// If no infrastructure bean name prefix has been set, override it.
if (this.advisorBeanNamePrefix == null) {

3
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java

@ -66,7 +66,6 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator @@ -66,7 +66,6 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator
new HashMap<String, DefaultListableBeanFactory>();
@Override
public final void setBeanFactory(BeanFactory beanFactory) {
if (!(beanFactory instanceof ConfigurableBeanFactory)) {
throw new IllegalStateException("Cannot do auto-TargetSource creation with a BeanFactory " +
@ -87,7 +86,6 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator @@ -87,7 +86,6 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator
// Implementation of the TargetSourceCreator interface
//---------------------------------------------------------------------
@Override
public final TargetSource getTargetSource(Class<?> beanClass, String beanName) {
AbstractBeanFactoryBasedTargetSource targetSource =
createBeanFactoryBasedTargetSource(beanClass, beanName);
@ -161,7 +159,6 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator @@ -161,7 +159,6 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator
* Destroys the internal BeanFactory on shutdown of the TargetSourceCreator.
* @see #getInternalBeanFactoryForBean
*/
@Override
public void destroy() {
synchronized (this.internalBeanFactories) {
for (DefaultListableBeanFactory bf : this.internalBeanFactories.values()) {

1
spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java

@ -105,7 +105,6 @@ public abstract class AbstractTraceInterceptor implements MethodInterceptor, Ser @@ -105,7 +105,6 @@ public abstract class AbstractTraceInterceptor implements MethodInterceptor, Ser
* to the {@code invokeUnderTrace} method for handling.
* @see #invokeUnderTrace(org.aopalliance.intercept.MethodInvocation, org.apache.commons.logging.Log)
*/
@Override
public Object invoke(MethodInvocation invocation) throws Throwable {
Log logger = getLoggerForInvocation(invocation);
if (isInterceptorEnabled(invocation, logger)) {

1
spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java

@ -80,7 +80,6 @@ public abstract class AsyncExecutionAspectSupport implements BeanFactoryAware { @@ -80,7 +80,6 @@ public abstract class AsyncExecutionAspectSupport implements BeanFactoryAware {
/**
* Set the {@link BeanFactory} to be used when looking up executors by qualifier.
*/
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
this.beanFactory = beanFactory;
}

3
spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java

@ -75,11 +75,9 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport @@ -75,11 +75,9 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport
* @return {@link Future} if the original method returns {@code Future}; {@code null}
* otherwise.
*/
@Override
public Object invoke(final MethodInvocation invocation) throws Throwable {
Future<?> result = this.determineAsyncExecutor(invocation.getMethod()).submit(
new Callable<Object>() {
@Override
public Object call() throws Exception {
try {
Object result = invocation.proceed();
@ -115,7 +113,6 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport @@ -115,7 +113,6 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport
return null;
}
@Override
public int getOrder() {
return Ordered.HIGHEST_PRECEDENCE;
}

1
spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java

@ -47,7 +47,6 @@ public class ConcurrencyThrottleInterceptor extends ConcurrencyThrottleSupport @@ -47,7 +47,6 @@ public class ConcurrencyThrottleInterceptor extends ConcurrencyThrottleSupport
setConcurrencyLimit(1);
}
@Override
public Object invoke(MethodInvocation methodInvocation) throws Throwable {
beforeAccess();
try {

2
spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java

@ -109,7 +109,6 @@ public abstract class ExposeBeanNameAdvisors { @@ -109,7 +109,6 @@ public abstract class ExposeBeanNameAdvisors {
this.beanName = beanName;
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
if (!(mi instanceof ProxyMethodInvocation)) {
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
@ -143,7 +142,6 @@ public abstract class ExposeBeanNameAdvisors { @@ -143,7 +142,6 @@ public abstract class ExposeBeanNameAdvisors {
return super.invoke(mi);
}
@Override
public String getBeanName() {
return this.beanName;
}

2
spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java

@ -84,7 +84,6 @@ public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered, @@ -84,7 +84,6 @@ public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered,
private ExposeInvocationInterceptor() {
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
MethodInvocation oldInvocation = invocation.get();
invocation.set(mi);
@ -96,7 +95,6 @@ public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered, @@ -96,7 +95,6 @@ public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered,
}
}
@Override
public int getOrder() {
return Ordered.HIGHEST_PRECEDENCE + 1;
}

2
spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java

@ -55,12 +55,10 @@ public class DefaultScopedObject implements ScopedObject, Serializable { @@ -55,12 +55,10 @@ public class DefaultScopedObject implements ScopedObject, Serializable {
}
@Override
public Object getTargetObject() {
return this.beanFactory.getBean(this.targetBeanName);
}
@Override
public void removeFromScope() {
this.beanFactory.destroyScopedBean(this.targetBeanName);
}

4
spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java

@ -78,7 +78,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<O @@ -78,7 +78,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<O
this.scopedTargetSource.setTargetBeanName(targetBeanName);
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
if (!(beanFactory instanceof ConfigurableBeanFactory)) {
throw new IllegalStateException("Not running in a ConfigurableBeanFactory: " + beanFactory);
@ -112,7 +111,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<O @@ -112,7 +111,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<O
}
@Override
public Object getObject() {
if (this.proxy == null) {
throw new FactoryBeanNotInitializedException();
@ -120,7 +118,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<O @@ -120,7 +118,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<O
return this.proxy;
}
@Override
public Class<?> getObjectType() {
if (this.proxy != null) {
return this.proxy.getClass();
@ -131,7 +128,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<O @@ -131,7 +128,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<O
return null;
}
@Override
public boolean isSingleton() {
return true;
}

2
spring-aop/src/main/java/org/springframework/aop/support/AbstractBeanFactoryPointcutAdvisor.java

@ -69,7 +69,6 @@ public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcu @@ -69,7 +69,6 @@ public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcu
return this.adviceBeanName;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
@ -80,7 +79,6 @@ public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcu @@ -80,7 +79,6 @@ public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcu
}
}
@Override
public Advice getAdvice() {
synchronized (this.adviceMonitor) {
if (this.advice == null && this.adviceBeanName != null) {

1
spring-aop/src/main/java/org/springframework/aop/support/AbstractExpressionPointcut.java

@ -83,7 +83,6 @@ public abstract class AbstractExpressionPointcut implements ExpressionPointcut, @@ -83,7 +83,6 @@ public abstract class AbstractExpressionPointcut implements ExpressionPointcut,
/**
* Return this pointcut's expression.
*/
@Override
public String getExpression() {
return this.expression;
}

1
spring-aop/src/main/java/org/springframework/aop/support/AbstractGenericPointcutAdvisor.java

@ -39,7 +39,6 @@ public abstract class AbstractGenericPointcutAdvisor extends AbstractPointcutAdv @@ -39,7 +39,6 @@ public abstract class AbstractGenericPointcutAdvisor extends AbstractPointcutAdv
this.advice = advice;
}
@Override
public Advice getAdvice() {
return this.advice;
}

2
spring-aop/src/main/java/org/springframework/aop/support/AbstractPointcutAdvisor.java

@ -44,7 +44,6 @@ public abstract class AbstractPointcutAdvisor implements PointcutAdvisor, Ordere @@ -44,7 +44,6 @@ public abstract class AbstractPointcutAdvisor implements PointcutAdvisor, Ordere
this.order = order;
}
@Override
public int getOrder() {
if (this.order != null) {
return this.order;
@ -56,7 +55,6 @@ public abstract class AbstractPointcutAdvisor implements PointcutAdvisor, Ordere @@ -56,7 +55,6 @@ public abstract class AbstractPointcutAdvisor implements PointcutAdvisor, Ordere
return Ordered.LOWEST_PRECEDENCE;
}
@Override
public boolean isPerInstance() {
return true;
}

1
spring-aop/src/main/java/org/springframework/aop/support/AbstractRegexpMethodPointcut.java

@ -124,7 +124,6 @@ public abstract class AbstractRegexpMethodPointcut extends StaticMethodMatcherPo @@ -124,7 +124,6 @@ public abstract class AbstractRegexpMethodPointcut extends StaticMethodMatcherPo
* of the target class as well as against the method's declaring class,
* plus the name of the method.
*/
@Override
public boolean matches(Method method, Class targetClass) {
return ((targetClass != null && matchesPattern(targetClass.getName() + "." + method.getName())) ||
matchesPattern(method.getDeclaringClass().getName() + "." + method.getName()));

2
spring-aop/src/main/java/org/springframework/aop/support/ClassFilters.java

@ -96,7 +96,6 @@ public abstract class ClassFilters { @@ -96,7 +96,6 @@ public abstract class ClassFilters {
this.filters = filters;
}
@Override
public boolean matches(Class clazz) {
for (int i = 0; i < this.filters.length; i++) {
if (this.filters[i].matches(clazz)) {
@ -131,7 +130,6 @@ public abstract class ClassFilters { @@ -131,7 +130,6 @@ public abstract class ClassFilters {
this.filters = filters;
}
@Override
public boolean matches(Class clazz) {
for (int i = 0; i < this.filters.length; i++) {
if (!this.filters[i].matches(clazz)) {

2
spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java

@ -170,12 +170,10 @@ public class ComposablePointcut implements Pointcut, Serializable { @@ -170,12 +170,10 @@ public class ComposablePointcut implements Pointcut, Serializable {
}
@Override
public ClassFilter getClassFilter() {
return this.classFilter;
}
@Override
public MethodMatcher getMethodMatcher() {
return this.methodMatcher;
}

6
spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java

@ -71,7 +71,6 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher @@ -71,7 +71,6 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher
/**
* Subclasses can override this for greater filtering (and performance).
*/
@Override
public boolean matches(Class clazz) {
return true;
}
@ -80,17 +79,14 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher @@ -80,17 +79,14 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher
* Subclasses can override this if it's possible to filter out
* some candidate classes.
*/
@Override
public boolean matches(Method method, Class targetClass) {
return true;
}
@Override
public boolean isRuntime() {
return true;
}
@Override
public boolean matches(Method method, Class targetClass, Object[] args) {
++this.evaluations;
ControlFlow cflow = ControlFlowFactory.createControlFlow();
@ -105,12 +101,10 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher @@ -105,12 +101,10 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher
}
@Override
public ClassFilter getClassFilter() {
return this;
}
@Override
public MethodMatcher getMethodMatcher() {
return this;
}

1
spring-aop/src/main/java/org/springframework/aop/support/DefaultBeanFactoryPointcutAdvisor.java

@ -47,7 +47,6 @@ public class DefaultBeanFactoryPointcutAdvisor extends AbstractBeanFactoryPointc @@ -47,7 +47,6 @@ public class DefaultBeanFactoryPointcutAdvisor extends AbstractBeanFactoryPointc
this.pointcut = (pointcut != null ? pointcut : Pointcut.TRUE);
}
@Override
public Pointcut getPointcut() {
return this.pointcut;
}

7
spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java

@ -102,12 +102,10 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil @@ -102,12 +102,10 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil
this.interfaces.add(intf);
}
@Override
public Class[] getInterfaces() {
return this.interfaces.toArray(new Class[this.interfaces.size()]);
}
@Override
public void validateInterfaces() throws IllegalArgumentException {
for (Class ifc : this.interfaces) {
if (this.advice instanceof DynamicIntroductionAdvice &&
@ -123,28 +121,23 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil @@ -123,28 +121,23 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@Override
public Advice getAdvice() {
return this.advice;
}
@Override
public boolean isPerInstance() {
return true;
}
@Override
public ClassFilter getClassFilter() {
return this;
}
@Override
public boolean matches(Class clazz) {
return true;
}

1
spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java

@ -77,7 +77,6 @@ public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor imple @@ -77,7 +77,6 @@ public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor imple
this.pointcut = (pointcut != null ? pointcut : Pointcut.TRUE);
}
@Override
public Pointcut getPointcut() {
return this.pointcut;
}

1
spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java

@ -83,7 +83,6 @@ public class DelegatePerTargetObjectIntroductionInterceptor extends Introduction @@ -83,7 +83,6 @@ public class DelegatePerTargetObjectIntroductionInterceptor extends Introduction
* behaviour in around advice. However, subclasses should invoke this
* method, which handles introduced interfaces and forwarding to the target.
*/
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
if (isMethodOnIntroducedInterface(mi)) {
Object delegate = getIntroductionDelegateFor(mi.getThis());

1
spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java

@ -99,7 +99,6 @@ public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport @@ -99,7 +99,6 @@ public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport
* behaviour in around advice. However, subclasses should invoke this
* method, which handles introduced interfaces and forwarding to the target.
*/
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
if (isMethodOnIntroducedInterface(mi)) {
// Using the following method rather than direct reflection, we

2
spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java

@ -26,7 +26,6 @@ import org.springframework.aop.MethodMatcher; @@ -26,7 +26,6 @@ import org.springframework.aop.MethodMatcher;
*/
public abstract class DynamicMethodMatcher implements MethodMatcher {
@Override
public final boolean isRuntime() {
return true;
}
@ -35,7 +34,6 @@ public abstract class DynamicMethodMatcher implements MethodMatcher { @@ -35,7 +34,6 @@ public abstract class DynamicMethodMatcher implements MethodMatcher {
* Can override to add preconditions for dynamic matching. This implementation
* always returns true.
*/
@Override
public boolean matches(Method method, Class<?> targetClass) {
return true;
}

2
spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java

@ -30,12 +30,10 @@ import org.springframework.aop.Pointcut; @@ -30,12 +30,10 @@ import org.springframework.aop.Pointcut;
*/
public abstract class DynamicMethodMatcherPointcut extends DynamicMethodMatcher implements Pointcut {
@Override
public ClassFilter getClassFilter() {
return ClassFilter.TRUE;
}
@Override
public final MethodMatcher getMethodMatcher() {
return this;
}

1
spring-aop/src/main/java/org/springframework/aop/support/IntroductionInfoSupport.java

@ -59,7 +59,6 @@ public class IntroductionInfoSupport implements IntroductionInfo, Serializable { @@ -59,7 +59,6 @@ public class IntroductionInfoSupport implements IntroductionInfo, Serializable {
this.publishedInterfaces.remove(intf);
}
@Override
public Class[] getInterfaces() {
return this.publishedInterfaces.toArray(new Class[this.publishedInterfaces.size()]);
}

8
spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java

@ -112,13 +112,11 @@ public abstract class MethodMatchers { @@ -112,13 +112,11 @@ public abstract class MethodMatchers {
this.mm2 = mm2;
}
@Override
public boolean matches(Method method, Class targetClass, boolean hasIntroductions) {
return (matchesClass1(targetClass) && MethodMatchers.matches(this.mm1, method, targetClass, hasIntroductions)) ||
(matchesClass2(targetClass) && MethodMatchers.matches(this.mm2, method, targetClass, hasIntroductions));
}
@Override
public boolean matches(Method method, Class targetClass) {
return (matchesClass1(targetClass) && this.mm1.matches(method, targetClass)) ||
(matchesClass2(targetClass) && this.mm2.matches(method, targetClass));
@ -132,12 +130,10 @@ public abstract class MethodMatchers { @@ -132,12 +130,10 @@ public abstract class MethodMatchers {
return true;
}
@Override
public boolean isRuntime() {
return this.mm1.isRuntime() || this.mm2.isRuntime();
}
@Override
public boolean matches(Method method, Class targetClass, Object[] args) {
return this.mm1.matches(method, targetClass, args) || this.mm2.matches(method, targetClass, args);
}
@ -220,23 +216,19 @@ public abstract class MethodMatchers { @@ -220,23 +216,19 @@ public abstract class MethodMatchers {
this.mm2 = mm2;
}
@Override
public boolean matches(Method method, Class targetClass, boolean hasIntroductions) {
return MethodMatchers.matches(this.mm1, method, targetClass, hasIntroductions) &&
MethodMatchers.matches(this.mm2, method, targetClass, hasIntroductions);
}
@Override
public boolean matches(Method method, Class targetClass) {
return this.mm1.matches(method, targetClass) && this.mm2.matches(method, targetClass);
}
@Override
public boolean isRuntime() {
return this.mm1.isRuntime() || this.mm2.isRuntime();
}
@Override
public boolean matches(Method method, Class targetClass, Object[] args) {
// Because a dynamic intersection may be composed of a static and dynamic part,
// we must avoid calling the 3-arg matches method on a dynamic matcher, as

1
spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java

@ -77,7 +77,6 @@ public class NameMatchMethodPointcut extends StaticMethodMatcherPointcut impleme @@ -77,7 +77,6 @@ public class NameMatchMethodPointcut extends StaticMethodMatcherPointcut impleme
}
@Override
public boolean matches(Method method, Class targetClass) {
for (String mappedName : this.mappedNames) {
if (mappedName.equals(method.getName()) || isMatch(method.getName(), mappedName)) {

1
spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java

@ -85,7 +85,6 @@ public class NameMatchMethodPointcutAdvisor extends AbstractGenericPointcutAdvis @@ -85,7 +85,6 @@ public class NameMatchMethodPointcutAdvisor extends AbstractGenericPointcutAdvis
}
@Override
public Pointcut getPointcut() {
return this.pointcut;
}

2
spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java

@ -96,7 +96,6 @@ public abstract class Pointcuts { @@ -96,7 +96,6 @@ public abstract class Pointcuts {
public static SetterPointcut INSTANCE = new SetterPointcut();
@Override
public boolean matches(Method method, Class targetClass) {
return method.getName().startsWith("set") &&
method.getParameterTypes().length == 1 &&
@ -117,7 +116,6 @@ public abstract class Pointcuts { @@ -117,7 +116,6 @@ public abstract class Pointcuts {
public static GetterPointcut INSTANCE = new GetterPointcut();
@Override
public boolean matches(Method method, Class targetClass) {
return method.getName().startsWith("get") &&
method.getParameterTypes().length == 0;

1
spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java

@ -116,7 +116,6 @@ public class RegexpMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor @@ -116,7 +116,6 @@ public class RegexpMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor
/**
* Initialize the singleton Pointcut held within this Advisor.
*/
@Override
public Pointcut getPointcut() {
synchronized (this.pointcutMonitor) {
if (this.pointcut == null) {

1
spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java

@ -35,7 +35,6 @@ public class RootClassFilter implements ClassFilter, Serializable { @@ -35,7 +35,6 @@ public class RootClassFilter implements ClassFilter, Serializable {
this.clazz = clazz;
}
@Override
public boolean matches(Class candidate) {
return clazz.isAssignableFrom(candidate);
}

2
spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java

@ -26,12 +26,10 @@ import org.springframework.aop.MethodMatcher; @@ -26,12 +26,10 @@ import org.springframework.aop.MethodMatcher;
*/
public abstract class StaticMethodMatcher implements MethodMatcher {
@Override
public final boolean isRuntime() {
return false;
}
@Override
public final boolean matches(Method method, Class<?> targetClass, Object[] args) {
// should never be invoked because isRuntime() returns false
throw new UnsupportedOperationException("Illegal MethodMatcher usage");

2
spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcut.java

@ -43,13 +43,11 @@ public abstract class StaticMethodMatcherPointcut extends StaticMethodMatcher im @@ -43,13 +43,11 @@ public abstract class StaticMethodMatcherPointcut extends StaticMethodMatcher im
this.classFilter = classFilter;
}
@Override
public ClassFilter getClassFilter() {
return this.classFilter;
}
@Override
public final MethodMatcher getMethodMatcher() {
return this;
}

4
spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcutAdvisor.java

@ -63,7 +63,6 @@ public abstract class StaticMethodMatcherPointcutAdvisor extends StaticMethodMat @@ -63,7 +63,6 @@ public abstract class StaticMethodMatcherPointcutAdvisor extends StaticMethodMat
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@ -72,17 +71,14 @@ public abstract class StaticMethodMatcherPointcutAdvisor extends StaticMethodMat @@ -72,17 +71,14 @@ public abstract class StaticMethodMatcherPointcutAdvisor extends StaticMethodMat
this.advice = advice;
}
@Override
public Advice getAdvice() {
return this.advice;
}
@Override
public boolean isPerInstance() {
return true;
}
@Override
public Pointcut getPointcut() {
return this;
}

1
spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java

@ -59,7 +59,6 @@ public class AnnotationClassFilter implements ClassFilter { @@ -59,7 +59,6 @@ public class AnnotationClassFilter implements ClassFilter {
}
@Override
public boolean matches(Class clazz) {
return (this.checkInherited ?
(AnnotationUtils.findAnnotation(clazz, this.annotationType) != null) :

2
spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java

@ -90,12 +90,10 @@ public class AnnotationMatchingPointcut implements Pointcut { @@ -90,12 +90,10 @@ public class AnnotationMatchingPointcut implements Pointcut {
}
@Override
public ClassFilter getClassFilter() {
return this.classFilter;
}
@Override
public MethodMatcher getMethodMatcher() {
return this.methodMatcher;
}

1
spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMethodMatcher.java

@ -47,7 +47,6 @@ public class AnnotationMethodMatcher extends StaticMethodMatcher { @@ -47,7 +47,6 @@ public class AnnotationMethodMatcher extends StaticMethodMatcher {
}
@Override
public boolean matches(Method method, Class targetClass) {
if (method.isAnnotationPresent(this.annotationType)) {
return true;

4
spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java

@ -105,7 +105,6 @@ public abstract class AbstractBeanFactoryBasedTargetSource @@ -105,7 +105,6 @@ public abstract class AbstractBeanFactoryBasedTargetSource
* Set the owning BeanFactory. We need to save a reference so that we can
* use the {@code getBean} method on every invocation.
*/
@Override
public void setBeanFactory(BeanFactory beanFactory) {
if (this.targetBeanName == null) {
throw new IllegalStateException("Property'targetBeanName' is required");
@ -121,7 +120,6 @@ public abstract class AbstractBeanFactoryBasedTargetSource @@ -121,7 +120,6 @@ public abstract class AbstractBeanFactoryBasedTargetSource
}
@Override
public synchronized Class<?> getTargetClass() {
if (this.targetClass == null && this.beanFactory != null) {
// Determine type of the target bean.
@ -139,12 +137,10 @@ public abstract class AbstractBeanFactoryBasedTargetSource @@ -139,12 +137,10 @@ public abstract class AbstractBeanFactoryBasedTargetSource
return this.targetClass;
}
@Override
public boolean isStatic() {
return false;
}
@Override
public void releaseTarget(Object target) throws Exception {
// Nothing to do here.
}

4
spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java

@ -64,12 +64,10 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource { @@ -64,12 +64,10 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource {
* a meaningful value when the target is still {@code null}.
* @see #isInitialized()
*/
@Override
public synchronized Class<?> getTargetClass() {
return (this.lazyTarget != null ? this.lazyTarget.getClass() : null);
}
@Override
public boolean isStatic() {
return false;
}
@ -79,7 +77,6 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource { @@ -79,7 +77,6 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource {
* creating it on-the-fly if it doesn't exist already.
* @see #createObject()
*/
@Override
public synchronized Object getTarget() throws Exception {
if (this.lazyTarget == null) {
logger.debug("Initializing lazy target object");
@ -88,7 +85,6 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource { @@ -88,7 +85,6 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource {
return this.lazyTarget;
}
@Override
public void releaseTarget(Object target) throws Exception {
// nothing to do
}

2
spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java

@ -68,7 +68,6 @@ public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBased @@ -68,7 +68,6 @@ public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBased
/**
* Return the maximum size of the pool.
*/
@Override
public int getMaxSize() {
return this.maxSize;
}
@ -98,7 +97,6 @@ public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBased @@ -98,7 +97,6 @@ public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBased
* @throws Exception we may need to deal with checked exceptions from pool
* APIs, so we're forgiving with our exception signature
*/
@Override
public abstract Object getTarget() throws Exception;
/**

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save