Browse Source

codacy: These nested if statements could be combined

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 5 years ago
parent
commit
2dabd04aa9

+ 2 - 4
src/main/java/com/owncloud/android/ui/asynctasks/PrintAsyncTask.java

@@ -81,10 +81,8 @@ public class PrintAsyncTask extends AsyncTask<Void, Void, Boolean> {
         try {
             int status = client.executeMethod(getMethod);
             if (status == HttpStatus.SC_OK) {
-                if (file.exists()) {
-                    if (!file.delete()) {
-                        return false;
-                    }
+                if (file.exists() && !file.delete()) {
+                    return false;
                 }
 
                 file.getParentFile().mkdirs();