Skip to content

Commit 37fbcf6

Browse files
Aleksei VoitylovRealCLanger
authored andcommitted
8303376: Better launching of JDI
Reviewed-by: yan, mbalao Backport-of: 96cae3b3bc39898a60071369f8264e8503df32a0
1 parent c8100d4 commit 37fbcf6

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

Lines changed: 6 additions & 2 deletions
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
public JdiInitiator(int port, List<String> remoteVMOptions, String remoteAgent,
8586
boolean isLaunch, String host, int timeout,
@@ -104,7 +105,10 @@ public JdiInitiator(int port, List<String> remoteVMOptions, String remoteAgent,
104105
argumentName2Value.put("localAddress", host);
105106
}
106107
}
107-
argumentName2Value.putAll(customConnectorArgs);
108+
customConnectorArgs.entrySet()
109+
.stream()
110+
.filter(e -> !"vmexec".equals(e.getKey()))
111+
.forEach(e -> argumentName2Value.put(e.getKey(), e.getValue()));
108112
this.connectorArgs = mergeConnectorArgs(connector, argumentName2Value);
109113
this.vm = isLaunch
110114
? launchTarget()

0 commit comments

Comments
 (0)