diff options
Diffstat (limited to '')
-rw-r--r-- | java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/logging/impl/DefaultLoggingMonitorImpl.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/logging/impl/DefaultLoggingMonitorImpl.java b/java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/logging/impl/DefaultLoggingMonitorImpl.java index d4dc3d2be4..8a9701b8fc 100644 --- a/java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/logging/impl/DefaultLoggingMonitorImpl.java +++ b/java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/logging/impl/DefaultLoggingMonitorImpl.java @@ -20,9 +20,7 @@ package org.apache.tuscany.sca.monitor.logging.impl; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; @@ -77,7 +75,10 @@ public class DefaultLoggingMonitorImpl implements Monitor { return problemCache; } - public Problem getLastLoggedProblem(){ + public Problem getLastLoggedProblem() { + if (problemCache.isEmpty()) { + return null; + } return problemCache.get(problemCache.size() - 1); } |