protected against a possible null for lastGC in the previous collection
This commit is contained in:
parent
260aab21fd
commit
df4f4f056a
|
@ -102,7 +102,7 @@ public class JvmMonitorService extends AbstractLifecycleComponent<JvmMonitorServ
|
|||
|
||||
for (int i = 0; i < currentJvmStats.gc().collectors().length; i++) {
|
||||
GarbageCollector gc = currentJvmStats.gc().collectors()[i];
|
||||
if (gc.lastGc() != null) {
|
||||
if (gc.lastGc() != null && lastJvmStats.gc.collectors()[i].lastGc() != null) {
|
||||
GarbageCollector.LastGc lastGc = gc.lastGc();
|
||||
if (lastGc.startTime == lastJvmStats.gc.collectors()[i].lastGc().startTime()) {
|
||||
// we already handled this one...
|
||||
|
|
Loading…
Reference in New Issue