DataWalker dw = new DataWalker(simpleDataMap) {
void perData(String foundKey, String foundData) {
/* getCurrent() */
try {
cursor.getCurrent(new StringDbt(""),
null,
LockMode.DEFAULT);
fail("didn't throw NullPointerException");
} catch (NullPointerException IAE) {
} catch (DatabaseException DBE) {
fail("threw DatabaseException not " +
"NullPointerException");
}
try {
cursor.getCurrent(null,
new StringDbt(""),
LockMode.DEFAULT);
fail("didn't throw NullPointerException");
} catch (NullPointerException IAE) {
} catch (DatabaseException DBE) {
fail("threw DatabaseException not " +
"NullPointerException");
}
/* getFirst() */
try {
cursor.getFirst(new StringDbt(""),
null,
LockMode.DEFAULT);
fail("didn't throw NullPointerException");
} catch (NullPointerException IAE) {
} catch (DatabaseException DBE) {
fail("threw DatabaseException not " +
"NullPointerException");
}
try {
cursor.getFirst(null,
new StringDbt(""),
LockMode.DEFAULT);
fail("didn't throw NullPointerException");
} catch (NullPointerException IAE) {
} catch (DatabaseException DBE) {
fail("threw DatabaseException not " +
"NullPointerException");
}
/* getNext(), getPrev, getNextDup,
getNextNoDup, getPrevNoDup */
try {
cursor.getNext(new StringDbt(""),
null,
LockMode.DEFAULT);
fail("didn't throw NullPointerException");
} catch (NullPointerException IAE) {
} catch (DatabaseException DBE) {
fail("threw DatabaseException not " +
"NullPointerException");
}
try {
cursor.getNext(null,
new StringDbt(""),
LockMode.DEFAULT);
fail("didn't throw NullPointerException");
} catch (NullPointerException IAE) {
} catch (DatabaseException DBE) {
fail("threw DatabaseException not " +
"NullPointerException");
}
/* putXXX() */
try {
cursor.put(new StringDbt(""), null);
fail("didn't throw NullPointerException");
} catch (NullPointerException IAE) {
} catch (DatabaseException DBE) {
fail("threw DatabaseException not " +
"NullPointerException");
}
try {
cursor.put(null, new StringDbt(""));
fail("didn't throw NullPointerException");
} catch (NullPointerException IAE) {
} catch (DatabaseException DBE) {
fail("threw DatabaseException not " +
"NullPointerException");