codacy: These nested if statements could be combined

Signed-off-by: Andy Scherzinger <[email protected]>
This commit is contained in:
Andy Scherzinger committed 2019-10-14 14:59:28 +02:00
1 parent e0802a0da4
commit 2dabd04aa9
1 file changed
+2 -4
@@ -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();