Skip to content

Commit

Permalink
fix org.apache.dubbo.common.url.component.URLAddress#parse method to …
Browse files Browse the repository at this point in the history
…judge the isPathAddress problem #8285
  • Loading branch information
xiaoheng1 committed Jul 13, 2021
1 parent 2e8dca6 commit 48f849b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
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;

Expand Down Expand Up @@ -168,7 +170,7 @@ public static URLAddress parse(String rawAddress, String defaultProtocol, boolea
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);
}
Expand Down

0 comments on commit 48f849b

Please sign in to comment.