mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
7167157: jcmd command file parsing does not respect the "stop" command
Reviewed-by: alanb, dsamersoff, nloodin
This commit is contained in:
parent
ae57b6a361
commit
f88f95d575
1 changed files with 4 additions and 1 deletions
|
@ -142,8 +142,11 @@ public class JCmd {
|
|||
// Cast to HotSpotVirtualMachine as this is an
|
||||
// implementation specific method.
|
||||
HotSpotVirtualMachine hvm = (HotSpotVirtualMachine) vm;
|
||||
String lines[] = command .split("\\n");
|
||||
String lines[] = command.split("\\n");
|
||||
for (String line : lines) {
|
||||
if (line.trim().equals("stop")) {
|
||||
break;
|
||||
}
|
||||
try (InputStream in = hvm.executeJCmd(line);) {
|
||||
// read to EOF and just print output
|
||||
byte b[] = new byte[256];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue