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

albumenj 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 0631e70  fix org.apache.dubbo.common.url.component.URLAddress#parse 
method to judge the isPathAddress problem #8285 (#8286)
0631e70 is described below

commit 0631e705def9e9e25df3d56d17407a5fd83a7846
Author: xiaoheng1 <[email protected]>
AuthorDate: Thu Jul 15 18:52:41 2021 +0800

    fix org.apache.dubbo.common.url.component.URLAddress#parse method to judge 
the isPathAddress problem #8285 (#8286)
---
 .../main/java/org/apache/dubbo/common/url/component/URLAddress.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/common/url/component/URLAddress.java
 
b/dubbo-common/src/main/java/org/apache/dubbo/common/url/component/URLAddress.java
index dd88b64..82276bc 100644
--- 
a/dubbo-common/src/main/java/org/apache/dubbo/common/url/component/URLAddress.java
+++ 
b/dubbo-common/src/main/java/org/apache/dubbo/common/url/component/URLAddress.java
@@ -24,6 +24,8 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.util.Objects;
 
+import static org.apache.dubbo.common.constants.CommonConstants.PATH_SEPARATOR;
+
 public class URLAddress implements Serializable {
     private static final long serialVersionUID = -1985165475234910535L;
 
@@ -168,7 +170,7 @@ public class URLAddress implements Serializable {
                 decodeStr = URLDecoder.decode(rawAddress, "UTF-8");
             }
 
-            boolean isPathAddress = !Character.isDigit(decodeStr.charAt(0));
+            boolean isPathAddress = decodeStr.contains(PATH_SEPARATOR);
             if (isPathAddress) {
                 return createPathURLAddress(decodeStr, rawAddress, 
defaultProtocol);
             }

Reply via email to