geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hiteshkhame...@apache.org
Subject [3/3] incubator-geode git commit: added null check in checkAddressesForUUIDs method
Date Thu, 10 Dec 2015 23:32:33 GMT
added null check in checkAddressesForUUIDs method


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/949507ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/949507ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/949507ff

Branch: refs/heads/develop
Commit: 949507ffad3b8a6237474f7ab302a118f06f6218
Parents: 7dfce7c
Author: Hitesh Khamesra <hiteshk25@yahoo.com>
Authored: Thu Dec 10 13:58:23 2015 -0800
Committer: Hitesh Khamesra <hiteshk25@yahoo.com>
Committed: Thu Dec 10 15:31:15 2015 -0800

----------------------------------------------------------------------
 .../membership/gms/mgr/GMSMembershipManager.java   | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/949507ff/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index 93c14e2..e5835c4 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -1995,13 +1995,16 @@ public class GMSMembershipManager implements MembershipManager, Manager
   
   void checkAddressesForUUIDs(InternalDistributedMember[] addresses) {
     for (int i=0; i<addresses.length; i++) {
-      GMSMember id = (GMSMember)addresses[i].getNetMember();
-      if (!id.hasUUID()) {
-        latestViewLock.readLock().lock();
-        try {
-          addresses[i] = latestView.getCanonicalID(addresses[i]);
-        } finally {
-          latestViewLock.readLock().unlock();
+      InternalDistributedMember m = addresses[i];
+      if(m != null) {
+        GMSMember id = (GMSMember)m.getNetMember();
+        if (!id.hasUUID()) {
+          latestViewLock.readLock().lock();
+          try {
+            addresses[i] = latestView.getCanonicalID(addresses[i]);
+          } finally {
+            latestViewLock.readLock().unlock();
+          }
         }
       }
     }


Mime
View raw message