Skip to content

Commit 173d71c

Browse files
committed
Minor optimization in Jvm.isDumpOnOOMEnabledSupported() - local/remote app check should be the first one
1 parent 9b27269 commit 173d71c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

visualvm/jvm/src/org/graalvm/visualvm/jvm/JVMImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,14 @@ public Properties getSystemProperties() {
360360
}
361361

362362
public boolean isDumpOnOOMEnabledSupported() {
363+
if (!Host.LOCALHOST.equals(application.getHost())) {
364+
return false;
365+
}
363366
if (getAttach() != null) {
364367
return true;
365368
}
366369
JmxModel jmx = getJmxModel();
367-
if (Host.LOCALHOST.equals(application.getHost()) && jmx != null && jmx.isTakeHeapDumpSupported()) {
370+
if (jmx != null && jmx.isTakeHeapDumpSupported()) {
368371
return true;
369372
}
370373
return false;

0 commit comments

Comments
 (0)