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 6a6eb0b  Fix EtcdServiceDiscovery not overriding the getUrl method, 
causing subscribe to throw an exception (#7659)
6a6eb0b is described below

commit 6a6eb0b85c428e9def9bd36bcc5a6dd0b3a955ab
Author: xiaoheng1 <[email protected]>
AuthorDate: Fri Apr 30 13:04:06 2021 +0800

    Fix EtcdServiceDiscovery not overriding the getUrl method, causing 
subscribe to throw an exception (#7659)
---
 .../java/org/apache/dubbo/registry/etcd/EtcdServiceDiscovery.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/dubbo-registry/dubbo-registry-etcd3/src/main/java/org/apache/dubbo/registry/etcd/EtcdServiceDiscovery.java
 
b/dubbo-registry/dubbo-registry-etcd3/src/main/java/org/apache/dubbo/registry/etcd/EtcdServiceDiscovery.java
index 2ef9bac..c517ee6 100644
--- 
a/dubbo-registry/dubbo-registry-etcd3/src/main/java/org/apache/dubbo/registry/etcd/EtcdServiceDiscovery.java
+++ 
b/dubbo-registry/dubbo-registry-etcd3/src/main/java/org/apache/dubbo/registry/etcd/EtcdServiceDiscovery.java
@@ -62,6 +62,8 @@ public class EtcdServiceDiscovery extends 
AbstractServiceDiscovery implements Ev
     EtcdClient etcdClient;
     EventDispatcher dispatcher;
 
+    private URL registryURL;
+
     @Override
     public void onEvent(ServiceInstancesChangedEvent event) {
         registerServiceWatcher(event.getServiceName());
@@ -90,6 +92,7 @@ public class EtcdServiceDiscovery extends 
AbstractServiceDiscovery implements Ev
 
         this.dispatcher = EventDispatcher.getDefaultExtension();
         this.dispatcher.addEventListener(this);
+        this.registryURL = registryURL;
     }
 
     @Override
@@ -203,4 +206,9 @@ public class EtcdServiceDiscovery extends 
AbstractServiceDiscovery implements Ev
             register(serviceInstance);
         }
     }
+
+    @Override
+    public URL getUrl() {
+        return registryURL;
+    }
 }

Reply via email to