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 2020/01/17 09:44:09 UTC
[dubbo] branch 2.6.x updated: user can custom registry cluster
(#5601)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/2.6.x by this push:
new a8f6f99 user can custom registry cluster (#5601)
a8f6f99 is described below
commit a8f6f99e434cb69f6cb343d38665c38bbbf6ba1d
Author: bruce <84...@qq.com>
AuthorDate: Fri Jan 17 17:43:34 2020 +0800
user can custom registry cluster (#5601)
---
.../src/main/java/com/alibaba/dubbo/config/ReferenceConfig.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ReferenceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ReferenceConfig.java
index adcff42..9a9226f 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ReferenceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ReferenceConfig.java
@@ -405,7 +405,7 @@ public class ReferenceConfig<T> extends AbstractReferenceConfig {
}
if (registryURL != null) { // registry url is available
// use AvailableCluster only when register's cluster is available
- URL u = registryURL.addParameter(Constants.CLUSTER_KEY, AvailableCluster.NAME);
+ URL u = registryURL.addParameterIfAbsent(Constants.CLUSTER_KEY, AvailableCluster.NAME);
invoker = cluster.join(new StaticDirectory(u, invokers));
} else { // not a registry url
invoker = cluster.join(new StaticDirectory(invokers));