This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git


The following commit(s) were added to refs/heads/dev-metadata by this push:
     new 3d79fe0  Add enabled=true check for override url.
3d79fe0 is described below

commit 3d79fe0f20f64545cbd4b1c2e66039c04ea45aaa
Author: ken.lj <[email protected]>
AuthorDate: Fri Nov 9 17:20:43 2018 +0800

    Add enabled=true check for override url.
---
 .../apache/dubbo/rpc/cluster/configurator/AbstractConfigurator.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/configurator/AbstractConfigurator.java
 
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/configurator/AbstractConfigurator.java
index 642b7da..37b4e0f 100644
--- 
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/configurator/AbstractConfigurator.java
+++ 
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/configurator/AbstractConfigurator.java
@@ -47,7 +47,8 @@ public abstract class AbstractConfigurator implements 
Configurator {
 
     @Override
     public URL configure(URL url) {
-        if (configuratorUrl.getHost() == null || url == null || url.getHost() 
== null) {
+        // If override url is not enabled or is invalid, just return.
+        if (!configuratorUrl.getParameter(Constants.ENABLED_KEY, true) || 
configuratorUrl.getHost() == null || url == null || url.getHost() == null) {
             return url;
         }
         // If override url has port, means it is a provider address. We want 
to control a specific provider with this override url, it may take effect on 
the specific provider instance or on consumers holding this provider instance.

Reply via email to