ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-12654. Null check for cache value. (swagle)
Date Wed, 19 Aug 2015 22:47:46 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 9de3d480a -> c5a2b032a


AMBARI-12654. Null check for cache value. (swagle)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c5a2b032
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c5a2b032
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c5a2b032

Branch: refs/heads/branch-2.1
Commit: c5a2b032ab8aa445b05973763ce2408c34234a3e
Parents: 9de3d48
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Wed Aug 19 15:46:04 2015 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Wed Aug 19 15:47:37 2015 -0700

----------------------------------------------------------------------
 .../controller/metrics/timeline/cache/TimelineMetricCache.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c5a2b032/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCache.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCache.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCache.java
index ca141d4..47b2c4a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCache.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCache.java
@@ -63,7 +63,7 @@ public class TimelineMetricCache extends UpdatingSelfPopulatingCache {
 
     Element element = get(key);
     TimelineMetrics timelineMetrics = new TimelineMetrics();
-    if (element != null) {
+    if (element != null && element.getObjectValue() != null) {
       TimelineMetricsCacheValue value = (TimelineMetricsCacheValue) element.getObjectValue();
       if (LOG.isDebugEnabled()) {
         LOG.debug("Returning value from cache: " + value);


Mime
View raw message