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

liujun 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 6b5973e  Fix TagRoute unable to get remote application name (#6690)
6b5973e is described below

commit 6b5973ebc50f794fb59717f1ddf107b75bf62163
Author: Albumen Kevin <[email protected]>
AuthorDate: Thu Sep 3 18:00:51 2020 +0800

    Fix TagRoute unable to get remote application name (#6690)
---
 .../main/java/org/apache/dubbo/registry/client/InstanceAddressURL.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/InstanceAddressURL.java
 
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/InstanceAddressURL.java
index 5159cfc..494785d 100644
--- 
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/InstanceAddressURL.java
+++ 
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/InstanceAddressURL.java
@@ -27,6 +27,7 @@ import java.util.concurrent.ConcurrentHashMap;
 
 import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
 import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY;
+import static 
org.apache.dubbo.common.constants.CommonConstants.REMOTE_APPLICATION_KEY;
 import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
 
 public class InstanceAddressURL extends URL {
@@ -105,6 +106,8 @@ public class InstanceAddressURL extends URL {
             return getGroup();
         } else if (INTERFACE_KEY.equals(key)) {
             return getServiceInterface();
+        } else if (REMOTE_APPLICATION_KEY.equals(key)) {
+            return instance.getServiceName();
         }
 
         String protocolServiceKey = getProtocolServiceKey();

Reply via email to