You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2011/01/25 19:20:14 UTC

svn commit: r1063388 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java

Author: brandonwilliams
Date: Tue Jan 25 18:20:14 2011
New Revision: 1063388

URL: http://svn.apache.org/viewvc?rev=1063388&view=rev
Log:
Remove null checks missed from 1900

Modified:
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java?rev=1063388&r1=1063387&r2=1063388&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java Tue Jan 25 18:20:14 2011
@@ -1722,7 +1722,7 @@ public class StorageService implements I
         if (tokenMetadata_.isLeaving(endpoint))
             logger_.warn("Node " + endpoint + " is already being removed, continuing removal anyway");
 
-        if (replicatingNodes != null)
+        if (!replicatingNodes.isEmpty())
             throw new UnsupportedOperationException("This node is already processing a removal. Wait for it to complete, or use 'removetoken force' if this has failed.");
 
         // Find the endpoints that are going to become responsible for data
@@ -1773,13 +1773,13 @@ public class StorageService implements I
         // indicate the token has left
         Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.removedNonlocal(localToken, token));
 
-        replicatingNodes = null;
+        replicatingNodes.clear();
         removingNode = null;
     }
 
     public void confirmReplication(InetAddress node)
     {
-        assert replicatingNodes != null;
+        assert !replicatingNodes.isEmpty();
         replicatingNodes.remove(node);
     }