1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-23 03:22:37 +01:00

Improve code style

Co-Authored-By: B0pol <bopol@e.email>
This commit is contained in:
Tobias Groza 2020-03-07 19:10:32 +01:00
parent 3e1e07e468
commit 9db2197be1

View File

@ -43,11 +43,11 @@ public final class NewPipeDatabase {
}
public static void checkpoint() {
if(null == databaseInstance){
if (databaseInstance == null) {
throw new IllegalStateException("database is not initialized");
}
Cursor c = databaseInstance.query("pragma wal_checkpoint(full)", null);
if(c.moveToFirst() && c.getInt(0) == 1) {
if (c.moveToFirst() && c.getInt(0) == 1) {
throw new RuntimeException("Checkpoint was blocked from completing");
}
}