protected against a possible null for lastGC in the previous collection

This commit is contained in:
kimchy 2011-02-11 01:48:23 +02:00
parent 260aab21fd
commit df4f4f056a
1 changed files with 1 additions and 1 deletions

View File

@ -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...