You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/01/20 07:02:39 UTC
[dubbo] branch 3.0 updated: refactor: Optimize DisableInject annotation judgment method (#9504)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new a113a98 refactor: Optimize DisableInject annotation judgment method (#9504)
a113a98 is described below
commit a113a98694b12af28aae6ebaa24087e627f4832d
Author: 桔子 <ju...@qq.com>
AuthorDate: Thu Jan 20 15:01:18 2022 +0800
refactor: Optimize DisableInject annotation judgment method (#9504)
---
.../main/java/org/apache/dubbo/common/extension/ExtensionLoader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java b/dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java
index 245a35e..56efe8f 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java
@@ -836,7 +836,7 @@ public class ExtensionLoader<T> {
/**
* Check {@link DisableInject} to see if we need auto injection for this property
*/
- if (method.getAnnotation(DisableInject.class) != null) {
+ if (method.isAnnotationPresent(DisableInject.class)) {
continue;
}
Class<?> pt = method.getParameterTypes()[0];