cse-peter-account commented on a change in pull request #673:
URL: https://github.com/apache/jmeter/pull/673#discussion_r721055150
##########
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:
Done:
commit 2fd1f1eb9057ba24ace59fc3b0b5452001aa1a40
Please kindly review. Thanks!
--
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]