From 2fc6e5d60346c96b86453f668dbe64587211455d Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 29 Jul 2022 10:12:23 +0200 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/SimpleTask.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/SimpleTask.java b/app/src/main/java/eu/faircode/email/SimpleTask.java index 4c88c45bc1..a61726581a 100644 --- a/app/src/main/java/eu/faircode/email/SimpleTask.java +++ b/app/src/main/java/eu/faircode/email/SimpleTask.java @@ -183,7 +183,7 @@ public abstract class SimpleTask implements LifecycleObserver { future = getExecutor(context).submit(new Runnable() { private Object data; private long elapsed; - private Throwable ex; + private Throwable error; @Override public void run() { @@ -206,7 +206,7 @@ public abstract class SimpleTask implements LifecycleObserver { Log.i(ex); else Log.e(ex); - this.ex = ex; + error = ex; } finally { if (wl.isHeld()) wl.release(); @@ -283,7 +283,7 @@ public abstract class SimpleTask implements LifecycleObserver { } } finally { try { - if (ex == null) { + if (error == null) { if (log && BuildConfig.BETA_RELEASE) { Log.i("Crumb " + name); Map crumb = new HashMap<>(); @@ -294,7 +294,7 @@ public abstract class SimpleTask implements LifecycleObserver { onExecuted(args, (T) data); } else try { - onException(args, ex); + onException(args, error); } catch (Throwable exex) { Log.e(exex); }