From e7b00b65f9eaec6cbb39e0aa8a12da67aeff0523 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Mon, 7 Sep 2020 21:09:39 +0200 Subject: [PATCH] Apply "Statement lambda can be replaced with expression lambda" refactoring. --- .../java/wallettemplate/controls/BitcoinAddressValidator.java | 4 +--- .../src/main/java/wallettemplate/utils/GuiUtils.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/wallettemplate/src/main/java/wallettemplate/controls/BitcoinAddressValidator.java b/wallettemplate/src/main/java/wallettemplate/controls/BitcoinAddressValidator.java index 75f4e2126..29f7f2cd6 100644 --- a/wallettemplate/src/main/java/wallettemplate/controls/BitcoinAddressValidator.java +++ b/wallettemplate/src/main/java/wallettemplate/controls/BitcoinAddressValidator.java @@ -40,9 +40,7 @@ public class BitcoinAddressValidator { // the example/prompt address hard to read. new TextFieldValidator(field, text -> text.isEmpty() || testAddr(text)); // However we do want the buttons to be disabled when empty so we apply a different test there. - field.textProperty().addListener((observableValue, prev, current) -> { - toggleButtons(current); - }); + field.textProperty().addListener((observableValue, prev, current) -> toggleButtons(current)); toggleButtons(field.getText()); } diff --git a/wallettemplate/src/main/java/wallettemplate/utils/GuiUtils.java b/wallettemplate/src/main/java/wallettemplate/utils/GuiUtils.java index 6d1a97b88..92c22ad40 100644 --- a/wallettemplate/src/main/java/wallettemplate/utils/GuiUtils.java +++ b/wallettemplate/src/main/java/wallettemplate/utils/GuiUtils.java @@ -71,9 +71,7 @@ public class GuiUtils { /** Show a GUI alert box for any unhandled exceptions that propagate out of this thread. */ public static void handleCrashesOnThisThread() { - Thread.currentThread().setUncaughtExceptionHandler((thread, exception) -> { - GuiUtils.crashAlert(Throwables.getRootCause(exception)); - }); + Thread.currentThread().setUncaughtExceptionHandler((thread, exception) -> GuiUtils.crashAlert(Throwables.getRootCause(exception))); } public static void informationalAlert(String message, String details, Object... args) {