From b439e767e97e932f95e63aeb964ab350861c0d76 Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 9 Jul 2020 20:27:42 -0400 Subject: [PATCH] refactoring --- .../autoupdate/src/com/rusefi/autoupdate/Autoupdate.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/java_console/autoupdate/src/com/rusefi/autoupdate/Autoupdate.java b/java_console/autoupdate/src/com/rusefi/autoupdate/Autoupdate.java index f8cd5b441f..dbc997de98 100644 --- a/java_console/autoupdate/src/com/rusefi/autoupdate/Autoupdate.java +++ b/java_console/autoupdate/src/com/rusefi/autoupdate/Autoupdate.java @@ -99,7 +99,6 @@ public class Autoupdate { } private static boolean askUserIfUpdateIsDesired() { - AtomicBoolean doUpdate = new AtomicBoolean(); CountDownLatch frameClosed = new CountDownLatch(1); if (AutoupdateUtil.runHeadless) { @@ -107,10 +106,12 @@ public class Autoupdate { return true; } - return askUserIfUpdateIsDesiredWithGUI(doUpdate, frameClosed); + return askUserIfUpdateIsDesiredWithGUI(frameClosed); } - private static boolean askUserIfUpdateIsDesiredWithGUI(AtomicBoolean doUpdate, CountDownLatch frameClosed) { + private static boolean askUserIfUpdateIsDesiredWithGUI(CountDownLatch frameClosed) { + AtomicBoolean doUpdate = new AtomicBoolean(); + FrameHelper frameHelper = new FrameHelper() { @Override protected void onWindowClosed() {