When a column is null, following method in CursorWindow.java has null pointer exception.
E/AndroidRuntime(11321): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
E/AndroidRuntime(11321): at net.zetetic.database.CursorWindow.copyStringToBuffer
public void copyStringToBuffer(int row, int column, CharArrayBuffer buffer) {
if (buffer == null) {
throw new IllegalArgumentException("CharArrayBuffer should not be null");
}
// TODO not as optimal as the original code
char[] chars = getString(row, column).toCharArray(); < ---------- NPE
buffer.data = chars;
buffer.sizeCopied = chars.length;
}
There is another copyStringToBuffer method in AbstractCursor.java which is safer than the one which has NPE.
Tests in AbstractCursorTest.java are ignored without any reason.
When a column is null, following method in CursorWindow.java has null pointer exception.
There is another copyStringToBuffer method in AbstractCursor.java which is safer than the one which has NPE.
Tests in AbstractCursorTest.java are ignored without any reason.