提交 e8fbeb52 authored 作者: Thomas Mueller's avatar Thomas Mueller

Opening a database could throw a NullPointerException.

上级 bcae6372
......@@ -208,19 +208,19 @@ public class PageLog {
PageStreamTrunk.Iterator it = new PageStreamTrunk.Iterator(store, firstTrunkPage);
while (firstTrunkPage != 0 && firstTrunkPage < store.getPageCount()) {
PageStreamTrunk t = it.next();
if (loopCount++ >= loopDetect) {
first = t.getPos();
loopCount = 0;
loopDetect *= 2;
} else if (first != 0 && t != null && first == t.getPos()) {
throw DbException.throwInternalError("endless loop at " + t);
}
if (t == null) {
if (it.canDelete()) {
store.free(firstTrunkPage, false);
}
break;
}
if (loopCount++ >= loopDetect) {
first = t.getPos();
loopCount = 0;
loopDetect *= 2;
} else if (first != 0 && first == t.getPos()) {
throw DbException.throwInternalError("endless loop at " + t);
}
t.free(currentDataPage);
firstTrunkPage = t.getNextTrunk();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论