mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Fix wrong null check
This commit is contained in:
parent
8b1c0e5e6f
commit
a406a94976
@ -17,7 +17,7 @@ public class DefaultJavaTimer implements Timer {
|
||||
|
||||
@Override
|
||||
public Timer runLater(Duration delay, Runnable runnable) {
|
||||
if (timer != null) {
|
||||
if (timer == null) {
|
||||
timer = new java.util.Timer();
|
||||
timer.schedule(new TimerTask() {
|
||||
@Override
|
||||
@ -39,7 +39,7 @@ public class DefaultJavaTimer implements Timer {
|
||||
|
||||
@Override
|
||||
public Timer runPeriodically(java.time.Duration interval, Runnable runnable) {
|
||||
if (timer != null) {
|
||||
if (timer == null) {
|
||||
timer = new java.util.Timer();
|
||||
timer.scheduleAtFixedRate(new TimerTask() {
|
||||
@Override
|
||||
|
@ -16,7 +16,7 @@ public class UITimer implements Timer {
|
||||
|
||||
@Override
|
||||
public Timer runLater(Duration delay, Runnable runnable) {
|
||||
if (timer != null) {
|
||||
if (timer == null) {
|
||||
timer = FxTimer.create(delay, runnable);
|
||||
timer.restart();
|
||||
} else {
|
||||
@ -27,7 +27,7 @@ public class UITimer implements Timer {
|
||||
|
||||
@Override
|
||||
public Timer runPeriodically(Duration interval, Runnable runnable) {
|
||||
if (timer != null) {
|
||||
if (timer == null) {
|
||||
timer = FxTimer.createPeriodic(interval, runnable);
|
||||
timer.restart();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user