ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ag...@apache.org
Subject ignite git commit: ignite-7396 NPE fixed
Date Mon, 15 Jan 2018 14:24:19 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 83f104aad -> 792ab3fe8


ignite-7396 NPE fixed

Signed-off-by: Andrey Gura <agura@apache.org>


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

Branch: refs/heads/master
Commit: 792ab3fe857cbf517f4e9dbaa038a6087b5f5bc1
Parents: 83f104a
Author: Slava Koptilin <slava.koptilin@gmail.com>
Authored: Mon Jan 15 17:23:59 2018 +0300
Committer: Andrey Gura <agura@apache.org>
Committed: Mon Jan 15 17:23:59 2018 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/util/IgniteUtils.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/792ab3fe/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index ea7c6d2..138f73e 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -1246,8 +1246,12 @@ public abstract class IgniteUtils {
         // In bytes.
         double totalOffheap = 0.0;
 
-        for (ClusterNode n : nodesPerJvm(nodes))
-            totalOffheap += n.<Long>attribute(ATTR_DATA_REGIONS_OFFHEAP_SIZE);
+        for (ClusterNode n : nodesPerJvm(nodes)) {
+            Long val = n.<Long>attribute(ATTR_DATA_REGIONS_OFFHEAP_SIZE);
+
+            if (val != null)
+                totalOffheap += val;
+        }
 
         return roundedHeapSize(totalOffheap, precision);
     }


Mime
View raw message