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
@ -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…
x
Reference in New Issue
Block a user