Skip to content

Commit bdf9fa7

Browse files
Prevent null String[] from throwing exception on delete
1 parent 81bde01 commit bdf9fa7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

android-database-sqlcipher/src/main/java/net/sqlcipher/database/SQLiteDatabase.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,11 +2264,7 @@ public long insertWithOnConflict(String table, String nullColumnHack,
22642264
* @throws IllegalStateException if the database is not open
22652265
*/
22662266
public int delete(String table, String whereClause, String[] whereArgs) {
2267-
Object[] args = new Object[whereArgs.length];
2268-
2269-
System.arraycopy(whereArgs, 0, args, 0, whereArgs.length);
2270-
2271-
return delete(table, whereClause, args);
2267+
return delete(table, whereClause, (Object[])whereArgs);
22722268
}
22732269

22742270
/**

0 commit comments

Comments
 (0)