Apply "Statement lambda can be replaced with expression lambda" refactoring.

This commit is contained in:
Andreas Schildbach 2020-09-07 21:09:39 +02:00
parent b6b221ae1b
commit e7b00b65f9
2 changed files with 2 additions and 6 deletions

View File

@ -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());
}

View File

@ -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) {