Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 1e09482a3 -> c94da6c63
  refs/heads/cassandra-2.1 3575cd356 -> a2b66bf10
  refs/heads/trunk f91cfc7e4 -> 8e808aed6


java.lang.AssertionError when reading saved cache

Patch by Benedict Elliott Smith; Reviewed by Robert Stupp for CASSANDRA-8740


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

Branch: refs/heads/cassandra-2.0
Commit: c94da6c63e9dc2b7059bb69e745ab769fcea536f
Parents: 1e09482
Author: Benedict Elliott Smith <bened...@apache.org>
Authored: Tue Mar 31 11:17:32 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Tue Mar 31 11:17:58 2015 +0200

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c94da6c6/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index bab9421..ed40a78 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.14:
+ * java.lang.AssertionError when reading saved cache (CASSANDRA-8740)
  * "disk full" when running cleanup (CASSANDRA-9036)
  * Make PasswordAuthenticator number of hashing rounds configurable 
(CASSANDRA-8085)
  * Lower logging level from ERROR to DEBUG when a scheduled schema pull

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c94da6c6/src/java/org/apache/cassandra/cache/AutoSavingCache.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cache/AutoSavingCache.java 
b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
index 64234e2..987535f 100644
--- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java
+++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
@@ -127,7 +127,8 @@ public class AutoSavingCache<K extends CacheKey, V> extends 
InstrumentingCache<K
                 for (Future<Pair<K, V>> future : futures)
                 {
                     Pair<K, V> entry = future.get();
-                    put(entry.left, entry.right);
+                    if (entry != null && entry.right != null)
+                       put(entry.left, entry.right);
                 }
             }
             catch (Exception e)

Reply via email to