cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/5] git commit: Fix potential NPE
Date Thu, 27 Mar 2014 15:23:40 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk da6f78d2b -> fc75fc2e4


Fix potential NPE


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

Branch: refs/heads/trunk
Commit: 5749fb1eaa81e4c6c6ba06bce38e3b29d17d398e
Parents: 07a451e
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu Mar 27 16:14:54 2014 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Mar 27 16:14:54 2014 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5749fb1e/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index ab0f588..0a2eb14 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1725,6 +1725,9 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
      */
     ColumnFamily filterColumnFamily(ColumnFamily cached, QueryFilter filter)
     {
+        if (cached == null)
+            return null;
+
         ColumnFamily cf = cached.cloneMeShallow(ArrayBackedSortedColumns.factory, filter.filter.isReversed());
         OnDiskAtomIterator ci = filter.getColumnFamilyIterator(cached);
 


Mime
View raw message