From 9db2197be1119e23f9e0317be9565c99c50d809c Mon Sep 17 00:00:00 2001 From: Tobias Groza Date: Sat, 7 Mar 2020 19:10:32 +0100 Subject: [PATCH] Improve code style Co-Authored-By: B0pol --- app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java b/app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java index 7bcef2744..605bed09c 100644 --- a/app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java +++ b/app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java @@ -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"); } }