This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 7f3602e Optimize the AbstractConfig#appendAnnotation method (#7774)
7f3602e is described below
commit 7f3602e9e8b78d80d9002aa84d7c242e02cffc1b
Author: 灼华 <[email protected]>
AuthorDate: Wed May 19 21:52:33 2021 +0800
Optimize the AbstractConfig#appendAnnotation method (#7774)
---
dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
index 43ef396..ff193df 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
@@ -34,6 +34,7 @@ import org.apache.dubbo.rpc.model.AsyncMethodInfo;
import javax.annotation.PostConstruct;
import java.io.Serializable;
+import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Collections;
@@ -367,6 +368,7 @@ public abstract class AbstractConfig implements
Serializable {
Method[] methods = annotationClass.getMethods();
for (Method method : methods) {
if (method.getDeclaringClass() != Object.class
+ && method.getDeclaringClass()!= Annotation.class
&& method.getReturnType() != void.class
&& method.getParameterTypes().length == 0
&& Modifier.isPublic(method.getModifiers())