parent = (IN) root.getTarget();
}
if (parent != null) {
INList inList = database.getDbEnvironment().getInMemoryINs();
if (!inList.getINs().contains(parent)) {
throw new DatabaseException
("IN " + parent.getNodeId() + " missing from INList");
}
for (int i = 0;; i += 1) {
try {
Node node = parent.getTarget(i);
if (i >= parent.getNEntries()) {
if (node != null) {
throw new DatabaseException
("IN " + parent.getNodeId() +
" has stray node " + node.getNodeId() +
" at index " + i);
}
byte[] key = parent.getKey(i);
if (key != null) {
throw new DatabaseException
("IN " + parent.getNodeId() +
" has stray key " + key +
" at index " + i);
}
}