Skip to content

Commit cb5f1b7

Browse files
lahodajslowhog
authored andcommittedJul 18, 2023
8303376: Better launching of JDI
Reviewed-by: mschoene, rhalade, vromero
1 parent 925138a commit cb5f1b7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ public class JdiInitiator {
7979
* @param timeout the start-up time-out in milliseconds. If zero or negative,
8080
* will not wait thus will timeout immediately if not already started.
8181
* @param customConnectorArgs custom arguments passed to the connector.
82-
* These are JDI com.sun.jdi.connect.Connector arguments.
82+
* These are JDI com.sun.jdi.connect.Connector arguments. The {@code vmexec}
83+
* argument is not supported.
8384
*/
8485
@SuppressWarnings("this-escape")
8586
public JdiInitiator(int port, List<String> remoteVMOptions, String remoteAgent,
@@ -105,7 +106,10 @@ public JdiInitiator(int port, List<String> remoteVMOptions, String remoteAgent,
105106
argumentName2Value.put("localAddress", host);
106107
}
107108
}
108-
argumentName2Value.putAll(customConnectorArgs);
109+
customConnectorArgs.entrySet()
110+
.stream()
111+
.filter(e -> !"vmexec".equals(e.getKey()))
112+
.forEach(e -> argumentName2Value.put(e.getKey(), e.getValue()));
109113
this.connectorArgs = mergeConnectorArgs(connector, argumentName2Value);
110114
this.vm = isLaunch
111115
? launchTarget()

0 commit comments

Comments
 (0)
Please sign in to comment.