fix CompilationMXBean may null problem. #1772

This commit is contained in:
hengyunabc
2021-04-19 14:23:30 +08:00
parent 4af322f6da
commit 1d1f0bebb3
@@ -115,6 +115,9 @@ public class JvmCommand extends AnnotatedCommand {
}
private void addCompilation(JvmModel jvmModel) {
if (compilationMXBean == null) {
return;
}
String group = "COMPILATION";
jvmModel.addItem(group, "NAME", compilationMXBean.getName());
if (compilationMXBean.isCompilationTimeMonitoringSupported()) {