From dfd909c5237383c56eed127474b4e5052520cbf8 Mon Sep 17 00:00:00 2001 From: Devin Bileck <603793+devinbileck@users.noreply.github.com> Date: Sun, 19 May 2019 14:10:19 -0700 Subject: [PATCH 1/3] Update deprecated use of Futures.addCallback --- .../main/java/com/neemre/btcdcli4j/daemon/BtcdDaemonImpl.java | 4 +++- .../btcdcli4j/daemon/notification/NotificationMonitor.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/daemon/src/main/java/com/neemre/btcdcli4j/daemon/BtcdDaemonImpl.java b/daemon/src/main/java/com/neemre/btcdcli4j/daemon/BtcdDaemonImpl.java index 9bd1cc3..3f0eb59 100644 --- a/daemon/src/main/java/com/neemre/btcdcli4j/daemon/BtcdDaemonImpl.java +++ b/daemon/src/main/java/com/neemre/btcdcli4j/daemon/BtcdDaemonImpl.java @@ -20,6 +20,8 @@ import java.util.concurrent.Future; import java.util.function.Consumer; +import static com.google.common.util.concurrent.MoreExecutors.directExecutor; + public class BtcdDaemonImpl implements BtcdDaemon { private static final Logger LOG = LoggerFactory.getLogger(BtcdDaemonImpl.class); @@ -218,7 +220,7 @@ public void onFailure(Throwable throwable) { if (errorHandler != null) errorHandler.accept(throwable); } - }); + }, directExecutor()); } } } diff --git a/daemon/src/main/java/com/neemre/btcdcli4j/daemon/notification/NotificationMonitor.java b/daemon/src/main/java/com/neemre/btcdcli4j/daemon/notification/NotificationMonitor.java index d151601..a097062 100644 --- a/daemon/src/main/java/com/neemre/btcdcli4j/daemon/notification/NotificationMonitor.java +++ b/daemon/src/main/java/com/neemre/btcdcli4j/daemon/notification/NotificationMonitor.java @@ -25,6 +25,8 @@ import java.util.concurrent.TimeUnit; import java.util.function.Consumer; +import static com.google.common.util.concurrent.MoreExecutors.directExecutor; + public class NotificationMonitor extends Observable implements Observer, Callable { private static final Logger LOG = LoggerFactory.getLogger(NotificationMonitor.class); @@ -83,7 +85,7 @@ public void onFailure(Throwable throwable) { if (errorHandler != null) errorHandler.accept(throwable); } - }); + }, directExecutor()); LOG.trace("-- run(..): total no. of '{}' notifications received: '{}', task queue " + "occupancy: '{}/{}'", type.name(), executor.getTaskCount(), From 8ef967b80adc7e5d8f92f238883c02b268078adb Mon Sep 17 00:00:00 2001 From: Devin Bileck <603793+devinbileck@users.noreply.github.com> Date: Sun, 19 May 2019 14:13:07 -0700 Subject: [PATCH 2/3] Use latest guava 27 --- daemon/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/pom.xml b/daemon/pom.xml index 5d89fd4..ecbdb9c 100644 --- a/daemon/pom.xml +++ b/daemon/pom.xml @@ -28,7 +28,7 @@ com.google.guava guava - 20.0 + 27.0.1-jre com.google.code.findbugs From 1bf76f1b3c7d3d63d695636ce0dfc410feeab318 Mon Sep 17 00:00:00 2001 From: Devin Bileck <603793+devinbileck@users.noreply.github.com> Date: Sun, 19 May 2019 14:16:25 -0700 Subject: [PATCH 3/3] Bump version --- core/pom.xml | 2 +- .../main/java/com/neemre/btcdcli4j/core/BtcdCli4jVersion.java | 4 ++-- daemon/pom.xml | 2 +- examples/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index cd0535a..0707632 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -5,7 +5,7 @@ network.bisq.btcd-cli4j btcd-cli4j-parent - 0.5.8.4 + 0.5.8.5 btcd-cli4j-core jar diff --git a/core/src/main/java/com/neemre/btcdcli4j/core/BtcdCli4jVersion.java b/core/src/main/java/com/neemre/btcdcli4j/core/BtcdCli4jVersion.java index 8eb0e6e..19c98bc 100644 --- a/core/src/main/java/com/neemre/btcdcli4j/core/BtcdCli4jVersion.java +++ b/core/src/main/java/com/neemre/btcdcli4j/core/BtcdCli4jVersion.java @@ -18,5 +18,5 @@ package com.neemre.btcdcli4j.core; public class BtcdCli4jVersion { - public static final String VERSION = "0.5.8.4"; -} \ No newline at end of file + public static final String VERSION = "0.5.8.5"; +} diff --git a/daemon/pom.xml b/daemon/pom.xml index ecbdb9c..fb05ec5 100644 --- a/daemon/pom.xml +++ b/daemon/pom.xml @@ -5,7 +5,7 @@ network.bisq.btcd-cli4j btcd-cli4j-parent - 0.5.8.4 + 0.5.8.5 btcd-cli4j-daemon jar diff --git a/examples/pom.xml b/examples/pom.xml index 8fdc640..6cca420 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ network.bisq.btcd-cli4j btcd-cli4j-parent - 0.5.8.4 + 0.5.8.5 btcd-cli4j-examples jar diff --git a/pom.xml b/pom.xml index 66d7cc9..85a1d08 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 network.bisq.btcd-cli4j btcd-cli4j-parent - 0.5.8.4 + 0.5.8.5 pom btcd-cli4j Parent