cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r829136 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java
Date Fri, 23 Oct 2009 17:25:59 GMT
Author: jbellis
Date: Fri Oct 23 17:25:58 2009
New Revision: 829136

URL: http://svn.apache.org/viewvc?rev=829136&view=rev
Log:
fix regression recognizing local reads from 828148.
patch by jbellis; reviewed by Brandon Williams for CASSANDRA-512

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java?rev=829136&r1=829135&r2=829136&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java Fri
Oct 23 17:25:58 2009
@@ -140,7 +140,7 @@
     public static void insertBlocking(RowMutation rm, int consistency_level) throws UnavailableException
     {
         long startTime = System.currentTimeMillis();
-        Message message = null;
+        Message message;
         try
         {
             message = rm.makeRowMutationMessage();
@@ -299,7 +299,7 @@
             for (ReadCommand command: commands)
             {
                 List<InetAddress> endpoints = StorageService.instance().getNaturalEndpoints(command.key);
-                boolean foundLocal = Arrays.asList(endpoints).contains(FBUtilities.getLocalAddress());
+                boolean foundLocal = endpoints.contains(FBUtilities.getLocalAddress());
                 //TODO: Throw InvalidRequest if we're in bootstrap mode?
                 if (foundLocal && !StorageService.instance().isBootstrapMode())
                 {
@@ -389,7 +389,7 @@
 
         for (QuorumResponseHandler<Row> quorumResponseHandler: quorumResponseHandlers)
         {
-            Row row = null;
+            Row row;
             ReadCommand command = commands.get(commandIndex);
             try
             {



Mime
View raw message