vkozhukhova commented on a change in pull request #8591:
URL: https://github.com/apache/ignite/pull/8591#discussion_r548440807



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java
##########
@@ -53,60 +55,99 @@ public static HostAndPortRange parse(String addrStr, int 
dfltPortFrom, int dfltP
 
         String host;
 
+        String portStr;
         int portFrom;
         int portTo;
 
         if (F.isEmpty(addrStr))
             throw createParseError(addrStr, errMsgPrefix, "Address is empty");
 
-        final int colIdx = addrStr.indexOf(':');
-
-        if (colIdx > 0) {
-            String portFromStr;
-            String portToStr;
+        if (addrStr.charAt(0) == '[') { // IPv6 with port(s)
+            int hostEndIdx = addrStr.indexOf(']');
+            if (hostEndIdx == -1) {
+                throw createParseError(addrStr, errMsgPrefix, "IPv6 is 
incorrect");
+            }

Review comment:
       Done.




----------------------------------------------------------------
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.

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


Reply via email to