提交 e1eea6e1 authored 作者: Andrei Tokar's avatar Andrei Tokar

more backward compatibility changes for #1952

上级 82f38479
...@@ -154,7 +154,6 @@ public class Cursor<K, V> implements Iterator<K> { ...@@ -154,7 +154,6 @@ public class Cursor<K, V> implements Iterator<K> {
private static CursorPos traverseDown(Page p, Object key) { private static CursorPos traverseDown(Page p, Object key) {
CursorPos cursorPos = null; CursorPos cursorPos = null;
while (!p.isLeaf()) { while (!p.isLeaf()) {
assert p.getKeyCount() > 0;
int index = 0; int index = 0;
if(key != null) { if(key != null) {
index = p.binarySearch(key) + 1; index = p.binarySearch(key) + 1;
......
...@@ -294,7 +294,7 @@ public class MVMap<K, V> extends AbstractMap<K, V> ...@@ -294,7 +294,7 @@ public class MVMap<K, V> extends AbstractMap<K, V>
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private K getFirstLast(boolean first) { private K getFirstLast(boolean first) {
Page p = getRootPage(); Page p = getRootPage();
if (p.getKeyCount() == 0) { if (p.getTotalCount() == 0) {
return null; return null;
} }
while (true) { while (true) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论