Repository: helix
Updated Branches:
  refs/heads/helix-0.6.x 0737d7acc -> a84060127


Fix Java 6 compilation error.


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

Branch: refs/heads/helix-0.6.x
Commit: a8406012703f0e4f77ac7d4f1c950ec13b569b5a
Parents: 0737d7a
Author: Lei Xia <[email protected]>
Authored: Thu Jan 19 14:32:30 2017 -0800
Committer: Lei Xia <[email protected]>
Committed: Thu Jan 19 14:32:30 2017 -0800

----------------------------------------------------------------------
 .../apache/helix/monitoring/mbeans/ClusterStatusMonitor.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/a8406012/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterStatusMonitor.java
----------------------------------------------------------------------
diff --git 
a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterStatusMonitor.java
 
b/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterStatusMonitor.java
index 3f1aca4..90cdc5a 100644
--- 
a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterStatusMonitor.java
+++ 
b/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterStatusMonitor.java
@@ -267,7 +267,10 @@ public class ClusterStatusMonitor implements 
ClusterStatusMonitorMBean {
       if (instanceName == null) {
         continue;
       }
-      messageCount.put(instanceName, messageCount.getOrDefault(instanceName, 
0L) + 1L);
+      if (!messageCount.containsKey(instanceName)) {
+        messageCount.put(instanceName, 0L);
+      }
+      messageCount.put(instanceName, messageCount.get(instanceName) + 1L);
     }
 
     // Update message count per instance

Reply via email to