Changeset 546b668


Ignore:
Timestamp:
Aug 24, 2011 6:03:56 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
bb5f3a9
Parents:
f6d2ac7
Message:

fix NPE after corruption ticket #515

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/metanotion/io/block/index/IBSkipSpan.java

    rf6d2ac7 r546b668  
    284284                        bss.loadFirstKey();
    285285                        Comparable nextFirstKey = bss.firstKey;
    286                         if (previousFirstKey.compareTo(nextFirstKey) >= 0) {
     286                        if (previousFirstKey == null || nextFirstKey == null ||
     287                            previousFirstKey.compareTo(nextFirstKey) >= 0) {
    287288                                // TODO remove, but if we are at the bottom of a level
    288289                                // we have to remove the level too, which is a mess
     
    313314                        bss.loadFirstKey();
    314315                        Comparable previousFirstKey = bss.firstKey;
    315                         if (previousFirstKey.compareTo(nextFirstKey) >= 0) {
     316                        if (previousFirstKey == null || nextFirstKey == null ||
     317                            previousFirstKey.compareTo(nextFirstKey) >= 0) {
    316318                                // TODO remove, but if we are at the bottom of a level
    317319                                // we have to remove the level too, which is a mess
Note: See TracChangeset for help on using the changeset viewer.