cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Fix potential ClassCastException in HintedHandoffManager
Date Thu, 22 May 2014 10:34:30 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 0fdf2ddbf -> 6127f8567


Fix potential ClassCastException in HintedHandoffManager

patch by slebresne; reviewed by benedict for CASSANDRA-7284


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

Branch: refs/heads/cassandra-2.1
Commit: 6127f85670e9aeb569d5cc74468a2e17cc93b0bb
Parents: 0fdf2dd
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu May 22 11:51:32 2014 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu May 22 12:33:44 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                | 1 +
 src/java/org/apache/cassandra/db/HintedHandOffManager.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6127f856/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d38fe5d..6b08fad 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -20,6 +20,7 @@
  * Add validate method to CollectionType (CASSANDRA-7208)
  * New serialization format for UDT values (CASSANDRA-7209, CASSANDRA-7261)
  * Fix nodetool netstats (CASSANDRA-7270)
+ * Fix potential ClassCastException in HintedHandoffManager (CASSANDRA-7284)
 Merged from 2.0:
  * Always reallocate buffers in HSHA (CASSANDRA-6285)
  * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6127f856/src/java/org/apache/cassandra/db/HintedHandOffManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/HintedHandOffManager.java b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
index 0337756..4aa3c1b 100644
--- a/src/java/org/apache/cassandra/db/HintedHandOffManager.java
+++ b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
@@ -264,7 +264,7 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
     {
         // done if no hints found or the start column (same as last column processed in previous
iteration) is the only one
         return hintColumnFamily == null
-               || (hintColumnFamily.getSortedColumns().size() == 1 && hintColumnFamily.getColumn((CellName)startColumn)
!= null);
+               || (!startColumn.isEmpty() && hintColumnFamily.getSortedColumns().size()
== 1 && hintColumnFamily.getColumn((CellName)startColumn) != null);
     }
 
     private int waitForSchemaAgreement(InetAddress endpoint) throws TimeoutException


Mime
View raw message