You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2019/10/27 04:09:24 UTC
[dubbo] 04/04: Postpone checkSubConfig logic in ReferenceConfig
(#5226)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit 4299fcca9b2ee4d0969c36d7581170a4be315ea5
Author: violin <gu...@ctrip.com>
AuthorDate: Thu Oct 24 14:46:51 2019 +0800
Postpone checkSubConfig logic in ReferenceConfig (#5226)
---
.../src/main/java/org/apache/dubbo/config/ReferenceConfig.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
index ae1c40f..1aefec3 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
@@ -241,12 +241,11 @@ public class ReferenceConfig<T> extends AbstractReferenceConfig {
}
public synchronized T get() {
- checkAndUpdateSubConfigs();
-
if (destroyed) {
throw new IllegalStateException("The invoker of ReferenceConfig(" + url + ") has already destroyed!");
}
if (ref == null) {
+ checkAndUpdateSubConfigs();
init();
}
return ref;