mirror of https://github.com/apache/cassandra
Avoid NPE when generating scrub error message
Patch by Stefania Alborghetti; reviewed by Tyler Hobbs for CASSANDRA-9290
This commit is contained in:
parent
a11bc78656
commit
dbb36a476b
|
|
@ -187,7 +187,7 @@ public class Scrubber implements Closeable
|
|||
if (key == null)
|
||||
throw new IOError(new IOException("Unable to read row key from data file"));
|
||||
|
||||
if (!key.key.equals(currentIndexKey))
|
||||
if (currentIndexKey != null && !key.key.equals(currentIndexKey))
|
||||
{
|
||||
throw new IOError(new IOException(String.format("Key from data file (%s) does not match key from index file (%s)",
|
||||
ByteBufferUtil.bytesToHex(key.key), ByteBufferUtil.bytesToHex(currentIndexKey))));
|
||||
|
|
|
|||
Loading…
Reference in New Issue