Closed mittt closed 4 years ago
My fault! I apologize for messing that up. Fortunately, it looks like that @developernotes already committed a fix: https://github.com/sqlcipher/android-database-sqlcipher/commit/bdf9fa71e8bdd3ee62dbdd2dcecf536abf4bb6cd#diff-fa99240cf3130ab4b9d25c14923ee2d6
Hi @mittt
As @commonsguy mentioned, that has already been fixed in master
. This fix will be included in our next public release. Thanks.
After updating from 4.2.0 to 4.3.0, I'm getting the following exception: java.lang.NullPointerException: Attempt to get length of null array at net.sqlcipher.database.SQLiteDatabase.delete(SQLiteDatabase.java:2267)
When calling db.delete("TABLENAME", null, null);
When you check the code, the error looks obvious:
Expected Behavior
To delete all rows as documented: "Passing null will delete all rows."
Actual Behavior
Exception: java.lang.NullPointerException: Attempt to get length of null array at net.sqlcipher.database.SQLiteDatabase.delete(SQLiteDatabase.java:2267)
Steps to Reproduce
db.delete("TABLENAME", null, null);
SQLCipher version (can be identified by executing
PRAGMA cipher_version;
): implementation 'net.zetetic:android-database-sqlcipher:4.3.0' implementation "androidx.sqlite:sqlite:2.0.1" SQLCipher for Android version: 9.0