You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by GitBox <gi...@apache.org> on 2021/10/03 22:58:09 UTC

[GitHub] [jmeter] ham1 commented on a change in pull request #673: Feature 65611

ham1 commented on a change in pull request #673:
URL: https://github.com/apache/jmeter/pull/673#discussion_r720928744



##########
File path: src/core/src/main/java/org/apache/jmeter/engine/ClientJMeterEngine.java
##########
@@ -58,12 +59,18 @@ private static RemoteJMeterEngine getEngine(String hostAndPort)
         final String name = RemoteJMeterEngineImpl.JMETER_ENGINE_RMI_NAME; // $NON-NLS-1$ $NON-NLS-2$
         String host = hostAndPort;
         int port = RmiUtils.DEFAULT_RMI_PORT;
-        int indexOfSeparator = hostAndPort.indexOf(':');
-        if (indexOfSeparator >= 0) {
-            host = hostAndPort.substring(0, indexOfSeparator);
-            String portAsString = hostAndPort.substring(indexOfSeparator+1);
-            port = Integer.parseInt(portAsString);
+
+        if (!isIPv6Address(host)){
+            int indexOfSeparator = hostAndPort.indexOf(':');
+            if (indexOfSeparator >= 0) {
+                host = hostAndPort.substring(0, indexOfSeparator);
+                String portAsString = hostAndPort.substring(indexOfSeparator+1);
+                port = Integer.parseInt(portAsString);
+            }
+        } else {
+            System.out.println("IPv6 address detected.  No parsing is required.");

Review comment:
       Should this else block and sout be removed?




-- 
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: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org