From 8fe68c33e4538ce0d7b06541d57096c4142c3cc6 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Thu, 19 Mar 2026 19:53:53 -0700 Subject: [PATCH 1/5] wallettemplate: update JavaFX to 25.0.2 --- wallettemplate/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallettemplate/build.gradle b/wallettemplate/build.gradle index c052e1b38e5..ca1052d81fd 100644 --- a/wallettemplate/build.gradle +++ b/wallettemplate/build.gradle @@ -26,7 +26,7 @@ configurations.configureEach { } javafx { - version = '25.0.1' + version = '25.0.2' modules = [ 'javafx.controls', 'javafx.fxml' ] } From a780e915ee8dbf16e2eaf20164a1de15ea860942 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Thu, 19 Mar 2026 19:58:09 -0700 Subject: [PATCH 2/5] build-gradle.yml: add `ubuntu-24.04-arm` to the build matrices --- .github/workflows/build-gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-gradle.yml b/.github/workflows/build-gradle.yml index e2fd9bd77c3..e1987daac34 100644 --- a/.github/workflows/build-gradle.yml +++ b/.github/workflows/build-gradle.yml @@ -8,7 +8,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - os: [ubuntu-24.04, macOS-15, macOS-15-intel, windows-2022] + os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15, macOS-15-intel, windows-2022] java: ['17', '21', '25'] distribution: ['temurin'] gradle: ['8.14.4', '9.2.1'] @@ -64,7 +64,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - os: [ubuntu-24.04, macOS-15] + os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15] java: [ '25' ] distribution: [ 'graalvm-community' ] gradle: ['9.2.1'] From 35af9db45214cf65cf8f5574fc94bf099b99bbb0 Mon Sep 17 00:00:00 2001 From: mkdev11 Date: Wed, 18 Mar 2026 03:51:50 +0100 Subject: [PATCH 3/5] NioServer: fix constructor resource leak on bind/selector failure --- core/src/main/java/org/bitcoinj/net/NioServer.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/net/NioServer.java b/core/src/main/java/org/bitcoinj/net/NioServer.java index a3323d20d7b..0eef0d2594b 100644 --- a/core/src/main/java/org/bitcoinj/net/NioServer.java +++ b/core/src/main/java/org/bitcoinj/net/NioServer.java @@ -82,10 +82,15 @@ public NioServer(final StreamConnectionFactory connectionFactory, InetSocketAddr this.connectionFactory = connectionFactory; sc = ServerSocketChannel.open(); - sc.configureBlocking(false); - sc.socket().bind(bindAddress); - selector = SelectorProvider.provider().openSelector(); - sc.register(selector, SelectionKey.OP_ACCEPT); + try { + sc.configureBlocking(false); + sc.socket().bind(bindAddress); + selector = SelectorProvider.provider().openSelector(); + sc.register(selector, SelectionKey.OP_ACCEPT); + } catch (IOException e) { + sc.close(); + throw e; + } } @Override From 933378b5454cfc013a0b9eed64e46f20ec422943 Mon Sep 17 00:00:00 2001 From: mkdev11 Date: Wed, 18 Mar 2026 03:53:31 +0100 Subject: [PATCH 4/5] NioServer: guard against null from `SocketChannel.accept()` on spurious wakeup --- core/src/main/java/org/bitcoinj/net/NioServer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/org/bitcoinj/net/NioServer.java b/core/src/main/java/org/bitcoinj/net/NioServer.java index 0eef0d2594b..5e0e21f2080 100644 --- a/core/src/main/java/org/bitcoinj/net/NioServer.java +++ b/core/src/main/java/org/bitcoinj/net/NioServer.java @@ -48,6 +48,8 @@ private void handleKey(Selector selector, SelectionKey key) throws IOException { if (key.isValid() && key.isAcceptable()) { // Accept a new connection, give it a stream connection as an attachment SocketChannel newChannel = sc.accept(); + if (newChannel == null) + return; // Spurious wakeup, no pending connection newChannel.configureBlocking(false); SelectionKey newKey = newChannel.register(selector, SelectionKey.OP_READ); try { From 24ed53c2e404d480c749a08fe3f32034612f4f9b Mon Sep 17 00:00:00 2001 From: mkdev11 Date: Wed, 18 Mar 2026 03:59:56 +0100 Subject: [PATCH 5/5] NioServer: widen catch in `run()` from `IOException` to `Exception` Unchecked exceptions from `handleKey()` (e.g. `RuntimeException` from `connectionOpened()`) currently escape to Guava, which transitions the service to FAILED state. This causes `awaitTerminated()` to throw `IllegalStateException` in `TestWithNetworkConnections.stopPeerServers()`, aborting the teardown loop and leaving remaining servers' ports bound. Widening the catch to `Exception` ensures these exceptions are handled gracefully and `run()` exits normally, so Guava transitions to TERMINATED instead of FAILED. --- core/src/main/java/org/bitcoinj/net/NioServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/bitcoinj/net/NioServer.java b/core/src/main/java/org/bitcoinj/net/NioServer.java index 5e0e21f2080..2ea695696a5 100644 --- a/core/src/main/java/org/bitcoinj/net/NioServer.java +++ b/core/src/main/java/org/bitcoinj/net/NioServer.java @@ -109,7 +109,7 @@ protected void run() { handleKey(selector, key); } } - } catch (IOException e) { + } catch (Exception e) { log.error("Error trying to open/read from connection", e); } finally { // Go through and close everything, without letting IOExceptions get in our way