Skip to content

Commit 9de0398

Browse files
committed
getCommandLine() does not work for read-only connection
1 parent cdcdbe3 commit 9de0398

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

visualvm/jmx/src/org/graalvm/visualvm/jmx/impl/JmxModelImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,11 @@ public boolean isTakeThreadDumpSupported() {
309309
}
310310

311311
public String getCommandLine() {
312-
return getJmxSupport().getCommandLine();
312+
JmxSupport support = getJmxSupport();
313+
if (support.isReadOnlyConnection()) {
314+
return null;
315+
}
316+
return support.getCommandLine();
313317
}
314318

315319
private JmxSupport getJmxSupport() {

0 commit comments

Comments
 (0)