mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-19 05:33:44 +01:00
Apply "Statement lambda can be replaced with expression lambda" refactoring.
This commit is contained in:
parent
b6b221ae1b
commit
e7b00b65f9
@ -40,9 +40,7 @@ public class BitcoinAddressValidator {
|
|||||||
// the example/prompt address hard to read.
|
// the example/prompt address hard to read.
|
||||||
new TextFieldValidator(field, text -> text.isEmpty() || testAddr(text));
|
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.
|
// However we do want the buttons to be disabled when empty so we apply a different test there.
|
||||||
field.textProperty().addListener((observableValue, prev, current) -> {
|
field.textProperty().addListener((observableValue, prev, current) -> toggleButtons(current));
|
||||||
toggleButtons(current);
|
|
||||||
});
|
|
||||||
toggleButtons(field.getText());
|
toggleButtons(field.getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,9 +71,7 @@ public class GuiUtils {
|
|||||||
|
|
||||||
/** Show a GUI alert box for any unhandled exceptions that propagate out of this thread. */
|
/** Show a GUI alert box for any unhandled exceptions that propagate out of this thread. */
|
||||||
public static void handleCrashesOnThisThread() {
|
public static void handleCrashesOnThisThread() {
|
||||||
Thread.currentThread().setUncaughtExceptionHandler((thread, exception) -> {
|
Thread.currentThread().setUncaughtExceptionHandler((thread, exception) -> GuiUtils.crashAlert(Throwables.getRootCause(exception)));
|
||||||
GuiUtils.crashAlert(Throwables.getRootCause(exception));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void informationalAlert(String message, String details, Object... args) {
|
public static void informationalAlert(String message, String details, Object... args) {
|
||||||
|
Loading…
Reference in New Issue
Block a user