Since we have performed a null check first and then downgraded
the unneeded instanceof check, we are left with a pure else-branch,
which proves the RuntimeException is not thrown.
Change-Id: I9dd8ba2d20738854a2790891dd6cfe099df91146
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
return null;
} else {
// complete the GCAS
- MainNode<K, V> prev = /* READ */ m.READ_PREV();
+ final MainNode<K, V> prev = /* READ */ m.READ_PREV();
INode<K, V> ctr = ct.readRoot(true);
if (prev == null) {
m = /* READ */ READ();
continue;
}
- } else if (prev != null) {
+ } else {
// Assume that you've read the root from the generation
// G.
// Assume that the snapshot algorithm is correct.
}
}
}
- throw new RuntimeException ("Should not happen");
}
}