cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [02/10] cassandra git commit: Fix potential NPE for compactionstats
Date Tue, 08 Nov 2016 15:47:37 GMT
Fix potential NPE for compactionstats

patch by Simon Zhou; reviewed by yukim for CASSANDRA-12462


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

Branch: refs/heads/cassandra-3.0
Commit: cbebb29adf5d8b13e75fe60c2f7aa312420be35c
Parents: 312e21b
Author: Simon Zhou <szhou@uber.com>
Authored: Thu Sep 22 16:35:52 2016 -0700
Committer: Yuki Morishita <yukim@apache.org>
Committed: Tue Nov 8 09:31:15 2016 -0600

----------------------------------------------------------------------
 CHANGES.txt                                                    | 3 +--
 .../org/apache/cassandra/db/compaction/CompactionInfo.java     | 6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbebb29a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b33ef8d..9d328ae 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Fix potential NPE for compactionstats (CASSANDRA-12462)
  * Prepare legacy authenticate statement if credentials table initialised after node startup
(CASSANDRA-12813)
  * Change cassandra.wait_for_tracing_events_timeout_secs default to 0 (CASSANDRA-12754)
  * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
@@ -9,8 +10,6 @@
  * Better handle invalid system roles table (CASSANDRA-12700)
  * Split consistent range movement flag correction (CASSANDRA-12786)
 Merged from 2.1:
-=======
-2.1.17
  * Don't skip sstables based on maxLocalDeletionTime (CASSANDRA-12765)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbebb29a/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java b/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
index fe81eac..3cd8737 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
@@ -65,17 +65,17 @@ public final class CompactionInfo implements Serializable
 
     public UUID getId()
     {
-        return cfm.cfId;
+        return cfm != null ? cfm.cfId : null;
     }
 
     public String getKeyspace()
     {
-        return cfm.ksName;
+        return cfm != null ? cfm.ksName : null;
     }
 
     public String getColumnFamily()
     {
-        return cfm.cfName;
+        return cfm != null ? cfm.cfName : null;
     }
 
     public CFMetaData getCFMetaData()


Mime
View raw message