cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] cassandra git commit: Fix rare NPE in ColumnDefinition#hasIndexOption()
Date Tue, 10 Mar 2015 21:03:03 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 4adb98146 -> 9eebe874d


Fix rare NPE in ColumnDefinition#hasIndexOption()

patch by Aleksey Yeschenko; reviewed by Tyler Hobbs for CASSANDRA-8786


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

Branch: refs/heads/trunk
Commit: 2206ffadd32b7d4d428e7a391a8c2e11d91a8ea9
Parents: 81fe1a2
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Tue Mar 10 14:02:10 2015 -0700
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Mar 10 14:02:10 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2206ffad/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index af5206b..29e7541 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.4
+ * Fix rare NPE in ColumnDefinition#hasIndexOption() (CASSANDRA-8786)
  * cassandra-stress reports per-operation statistics, plus misc (CASSANDRA-8769)
  * Add SimpleDate (cql date) and Time (cql time) types (CASSANDRA-7523)
  * Use long for key count in cfstats (CASSANDRA-8913)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2206ffad/src/java/org/apache/cassandra/config/ColumnDefinition.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/ColumnDefinition.java b/src/java/org/apache/cassandra/config/ColumnDefinition.java
index d6cc94c..c447375 100644
--- a/src/java/org/apache/cassandra/config/ColumnDefinition.java
+++ b/src/java/org/apache/cassandra/config/ColumnDefinition.java
@@ -486,6 +486,6 @@ public class ColumnDefinition extends ColumnSpecification
      */
     public boolean hasIndexOption(String name)
     {
-        return indexOptions.containsKey(name);
+        return indexOptions != null && indexOptions.containsKey(name);
     }
 }


Mime
View raw message