提交 bf28673e 编写于 作者: S sla

7167157: jcmd command file parsing does not respect the "stop" command

Reviewed-by: alanb, dsamersoff, nloodin
上级 f68c3ed3
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册