slfan1989 commented on code in PR #5236:
URL: https://github.com/apache/hadoop/pull/5236#discussion_r1053093731


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java:
##########
@@ -229,6 +230,23 @@ public static InetSocketAddress createSocketAddr(String 
target,
     }
     target = target.trim();
     boolean hasScheme = target.contains("://");
+    if (StringUtils.countMatches(target, ":") > 2) {
+      // if scheme exists in the target, for example:
+      // https://ffff:ffff:ffff:ffff::1:XXXX will be formed like
+      // https://[ffff:ffff:ffff:ffff::1]:XXXX

Review Comment:
   The code looks fine, we'd better use a specific port in the comments, such 
as `8088`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to