diff --git a/spring-aop/src/main/java/org/springframework/aop/MethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/MethodMatcher.java
index 7b863b07123..10ddbe84ba5 100644
--- a/spring-aop/src/main/java/org/springframework/aop/MethodMatcher.java
+++ b/spring-aop/src/main/java/org/springframework/aop/MethodMatcher.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,10 +50,11 @@ import org.springframework.lang.Nullable;
public interface MethodMatcher {
/**
- * Perform static checking whether the given method matches. If this
- * returns {@code false} or if the {@link #isRuntime()} method
- * returns {@code false}, no runtime check (i.e. no.
- * {@link #matches(java.lang.reflect.Method, Class, Object[])} call) will be made.
+ * Perform static checking whether the given method matches.
+ *
If this returns {@code false} or if the {@link #isRuntime()}
+ * method returns {@code false}, no runtime check (i.e. no
+ * {@link #matches(java.lang.reflect.Method, Class, Object[])} call)
+ * will be made.
* @param method the candidate method
* @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java
index bd6df6bd86f..25253e9fd54 100644
--- a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java
+++ b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java
@@ -152,11 +152,12 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
* @see #setTargetSource
* @see #setTarget
*/
- public void setTargetClass(Class> targetClass) {
+ public void setTargetClass(@Nullable Class> targetClass) {
this.targetSource = EmptyTargetSource.forClass(targetClass);
}
@Override
+ @Nullable
public Class> getTargetClass() {
return this.targetSource.getTargetClass();
}
diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java b/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java
index 586051bc78a..18396daa9a8 100644
--- a/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java
+++ b/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java
@@ -27,11 +27,11 @@ import org.aopalliance.intercept.MethodInterceptor;
import org.springframework.aop.Advisor;
import org.springframework.aop.IntroductionAdvisor;
-import org.springframework.aop.IntroductionAwareMethodMatcher;
import org.springframework.aop.MethodMatcher;
import org.springframework.aop.PointcutAdvisor;
import org.springframework.aop.framework.adapter.AdvisorAdapterRegistry;
import org.springframework.aop.framework.adapter.GlobalAdvisorAdapterRegistry;
+import org.springframework.aop.support.MethodMatchers;
import org.springframework.lang.Nullable;
/**
@@ -53,29 +53,18 @@ public class DefaultAdvisorChainFactory implements AdvisorChainFactory, Serializ
// This is somewhat tricky... We have to process introductions first,
// but we need to preserve order in the ultimate list.
- AdvisorAdapterRegistry registry = GlobalAdvisorAdapterRegistry.getInstance();
- Advisor[] advisors = config.getAdvisors();
- List