You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2012/03/16 11:27:53 UTC
[2/2] git commit: Guard against NPE in SSTableIdentityIterator
Guard against NPE in SSTableIdentityIterator
patch by dbrosius; reviewed by slebresne for CASSANDRA-4056
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d4eaf3ca
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d4eaf3ca
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d4eaf3ca
Branch: refs/heads/trunk
Commit: d4eaf3cab3ba5726503934a6c5b026aae399aa04
Parents: d025bec
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri Mar 16 11:24:44 2012 +0100
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Mar 16 11:26:27 2012 +0100
----------------------------------------------------------------------
.../io/sstable/SSTableIdentityIterator.java | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d4eaf3ca/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
index 275f983..242b249 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
@@ -151,7 +151,8 @@ public class SSTableIdentityIterator implements Comparable<SSTableIdentityIterat
}
catch (IOException e)
{
- sstable.markSuspect();
+ if (sstable != null)
+ sstable.markSuspect();
throw new IOError(e);
}
}