From 9a2dbaaace6d4351d809f35cbdbfc01ccdcd1e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Thu, 23 Apr 2026 13:46:26 +0200 Subject: [PATCH 01/11] ZOOKEEPER-5039: Upgrade Mockito to 5.23.0 for JDK25 As of Mockito 5.x, the mockito-inline mock-maker became the default, so mockito-inline as a separate artifact is no longer needed. --- pom.xml | 8 +------- zookeeper-server/pom.xml | 5 ----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 2811e0dfa06..345230e0f61 100644 --- a/pom.xml +++ b/pom.xml @@ -556,7 +556,7 @@ 1.48 5.6.2 1.6.2 - 4.9.0 + 5.23.0 2.2 1.5.0 4.1.130.Final @@ -704,12 +704,6 @@ mockito-core ${mockito.version} - - org.mockito - mockito-inline - ${mockito.version} - test - io.netty netty-bom diff --git a/zookeeper-server/pom.xml b/zookeeper-server/pom.xml index f4b76095d2e..1ad5afd34eb 100644 --- a/zookeeper-server/pom.xml +++ b/zookeeper-server/pom.xml @@ -145,11 +145,6 @@ mockito-core test - - org.mockito - mockito-inline - test - org.jmockit jmockit From d9de4c2dc236d1d0ab2e6e8261f1ccc0ac6e44e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Mon, 4 May 2026 10:44:02 +0200 Subject: [PATCH 02/11] ZOOKEEPER-5039: Switch GH: Action workflows to JDK 17 and 25 --- .github/workflows/ci.yaml | 12 ++++++------ .github/workflows/e2e.yaml | 2 +- .github/workflows/manual.yaml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6f09ab5c914..5d9bb1742b4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,17 +32,17 @@ jobs: strategy: matrix: profile: - - name: 'full-build-jdk8' - jdk: 8 + - name: 'full-build-jdk17' + jdk: 17 args: '-Pfull-build apache-rat:check verify -DskipTests spotbugs:check checkstyle:check' - - name: 'full-build-jdk11' - jdk: 11 + - name: 'full-build-jdk25' + jdk: 25 args: '-Pfull-build apache-rat:check verify -DskipTests spotbugs:check checkstyle:check' - name: 'full-build-java-tests' - jdk: 11 + jdk: 25 args: '-Pfull-build verify -Dsurefire-forkcount=1 -DskipCppUnit -Dsurefire.rerunFailingTestsCount=5' - name: 'full-build-cppunit-tests' - jdk: 11 + jdk: 25 args: '-Pfull-build verify -Dtest=_ -DfailIfNoTests=false' fail-fast: false timeout-minutes: 360 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index d20eba55b0d..daec0197b37 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -25,7 +25,7 @@ jobs: compatibility: strategy: matrix: - jdk: [8, 11] + jdk: [17, 25] zk: [3.5.9, 3.6.3, 3.7.0, nightly] fail-fast: false timeout-minutes: 360 diff --git a/.github/workflows/manual.yaml b/.github/workflows/manual.yaml index 8b50b8be361..0c9d01565d2 100644 --- a/.github/workflows/manual.yaml +++ b/.github/workflows/manual.yaml @@ -46,10 +46,10 @@ jobs: - uses: actions/checkout@v6 with: ref: ${{ github.event.inputs.buildRef }} - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v5 with: - java-version: 11 + java-version: 17 distribution: temurin cache: 'maven' - name: Show the first log message From c16e8fc5a74f1883504f398a97ba446112a34d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Mon, 4 May 2026 13:43:14 +0200 Subject: [PATCH 03/11] ZOOKEEPER-5039: Switch Jenkins workflows to JDK 17 and 25 --- Jenkinsfile | 2 +- Jenkinsfile-PreCommit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 40fcdd5bbad..5d235336434 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,7 +39,7 @@ pipeline { axes { axis { name 'JAVA_VERSION' - values 'jdk_1.8_latest', 'jdk_11_latest' + values 'jdk_17_latest', 'jdk_25_latest' } } diff --git a/Jenkinsfile-PreCommit b/Jenkinsfile-PreCommit index 8390e05b929..8c11430496c 100644 --- a/Jenkinsfile-PreCommit +++ b/Jenkinsfile-PreCommit @@ -30,7 +30,7 @@ pipeline { tools { maven "maven_latest" - jdk "jdk_1.8_latest" + jdk "jdk_17_latest" } stages { From b13cd1285dc10ec1fbcc2e3e04c934011131284f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Mon, 4 May 2026 13:45:25 +0200 Subject: [PATCH 04/11] ZOOKEEPER-5039: Upgrade spotbugs to support JDK 17 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 345230e0f61..d2b4fb9e451 100644 --- a/pom.xml +++ b/pom.xml @@ -568,7 +568,7 @@ 1.78 4.4 4.1.12.1 - 4.0.2 + 4.8.3 8.39 3.0.0-M3 2.17.0 @@ -881,7 +881,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.0.0 + 4.8.3.0 excludeFindBugsFilter.xml From c17f9ed6c6aba043d802d9c1c8cc01ace458b714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Thu, 7 May 2026 10:49:37 +0200 Subject: [PATCH 05/11] ZOOKEEPER-5039: Upgrade spotbugs to support Java 25 - Upgraded spotbugs-maven-plugin to 4.9.3.0 and annotations to 4.9.3. - Overrode ASM to 9.9.1 in the plugin dependencies to support JDK 25 (class file version 69). - Added newly found bug patterns to excludeFindBugsFilter.xml - these are all pre-existing issues in the codebase that the newer SpotBugs detects but the old version couldn't. --- excludeFindBugsFilter.xml | 18 ++++++++++++++++++ pom.xml | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/excludeFindBugsFilter.xml b/excludeFindBugsFilter.xml index a2965944837..573c76b2b83 100644 --- a/excludeFindBugsFilter.xml +++ b/excludeFindBugsFilter.xml @@ -7,5 +7,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index d2b4fb9e451..4adc2a1d9c5 100644 --- a/pom.xml +++ b/pom.xml @@ -568,7 +568,7 @@ 1.78 4.4 4.1.12.1 - 4.8.3 + 4.9.3 8.39 3.0.0-M3 2.17.0 @@ -881,10 +881,39 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.3.0 + 4.9.3.0 excludeFindBugsFilter.xml + + + + org.ow2.asm + asm + 9.9.1 + + + org.ow2.asm + asm-analysis + 9.9.1 + + + org.ow2.asm + asm-commons + 9.9.1 + + + org.ow2.asm + asm-tree + 9.9.1 + + + org.ow2.asm + asm-util + 9.9.1 + + org.owasp From 942f0e764386671d36c4827a1cdee4e002164bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Fri, 24 Apr 2026 10:55:15 +0200 Subject: [PATCH 06/11] ZOOKEEPER-5039: Upgrade burningwave mockdns to 0.27.2 for JDK25 to fix test issue: Caused by: io.github.toolfactory.jvm.util.ObjectProvider$BuildingException: Exception occurred while retrieving the implementation of class io.github.toolfactory.jvm.function.catalog.ConstructorInvokeFunction (jvm architecture: x64, jvm version: 25, jvm vendor: Eclipse Adoptium) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4adc2a1d9c5..6468aae1cbd 100644 --- a/pom.xml +++ b/pom.xml @@ -572,7 +572,7 @@ 8.39 3.0.0-M3 2.17.0 - 0.25.4 + 0.27.2 3.5.1 4.4.1 3.7.0.1746 From c6611da5281d9c1aea1aed0b2d6e215bf3ff1a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Thu, 7 May 2026 12:58:56 +0200 Subject: [PATCH 07/11] ZOOKEEPER-5039: Fix PrometheusMetricsProviderConfigTest Exception message differs now a bit. --- .../prometheus/PrometheusMetricsProviderConfigTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/test/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProviderConfigTest.java b/zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/test/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProviderConfigTest.java index 66a01fb95e7..68cc26abd08 100644 --- a/zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/test/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProviderConfigTest.java +++ b/zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/test/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProviderConfigTest.java @@ -21,6 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.FileInputStream; import java.io.IOException; import java.security.KeyStore; @@ -107,8 +108,10 @@ public void testInvalidAddr() throws MetricsProviderLifeCycleException { assertThrows(MetricsProviderLifeCycleException.class, provider::start); assertEquals("Failed to start Prometheus Jetty server", exception.getMessage()); - assertNotNull(exception.getCause()); - assertEquals("Failed to bind to master:0", exception.getCause().getMessage()); + Throwable cause = exception.getCause(); + assertNotNull(cause); + assertTrue(cause.getMessage().contains("Failed to bind to master")); + assertTrue(cause.getMessage().contains(":0")); } @Test From 6b2b7a9ef65a72ffb810290895443370c6652e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Fri, 8 May 2026 17:07:58 +0200 Subject: [PATCH 08/11] ZOOKEEPER-5039: Upgrade zookeeper/dev Docker image to JDK 17 Also update Maven to 3.9.6 - it includes several improvements. Since the old `jdk` and `openjdk` tags are deprecated, we should use the newer vendor-specific tags. Use Eclipse Temurin since we already use it in our GH: Actions workflows. --- dev/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/docker/Dockerfile b/dev/docker/Dockerfile index 4d8a5d08dd1..2de45f37816 100644 --- a/dev/docker/Dockerfile +++ b/dev/docker/Dockerfile @@ -17,7 +17,7 @@ # under the License. # -FROM maven:3.8.4-jdk-11 +FROM maven:3.9.6-eclipse-temurin-17 RUN apt-get update RUN apt-get install -y \ From 7ebeb3e3dcd7e15233c2bcc31dda7cea11dfc7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Thu, 21 May 2026 15:15:38 +0200 Subject: [PATCH 09/11] ZOOKEEPER-5039: Change Maven compiler source and target to 17 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6468aae1cbd..0bbe4d59837 100644 --- a/pom.xml +++ b/pom.xml @@ -540,8 +540,8 @@ - 1.8 - 1.8 + 17 + 17 1691130453 false 2.22.1 From 570ecd8461772d80baee78b3bea5cb789783beff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Thu, 21 May 2026 15:31:27 +0200 Subject: [PATCH 10/11] ZOOKEEPER-5039: Align Maven compiler Java versions - Replaced maven.compiler.source=17 + maven.compiler.target=17 with a single maven.compiler.release=17 - Removed maven.compiler.release property from m2e profile (it now inherits from main properties). --- pom.xml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 0bbe4d59837..5f30d4b1455 100644 --- a/pom.xml +++ b/pom.xml @@ -350,9 +350,6 @@ m2e.version - - 8 - @@ -436,15 +433,6 @@ - - jdk-release-flag - - [9,) - - - 8 - - clover @@ -540,8 +528,7 @@ - 17 - 17 + 17 1691130453 false 2.22.1 From 36b3f838d14ccd3adb3d1ace28bfd5d558218a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Paksy?= Date: Thu, 21 May 2026 15:43:32 +0200 Subject: [PATCH 11/11] ZOOKEEPER-5039: Update documentation --- README.md | 7 +------ .../src/main/resources/markdown/zookeeperAdmin.md | 10 +++------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index cd9db2b460c..6bc86742eb4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

- https://zookeeper.apache.org/
+ https://zookeeper.apache.org/

@@ -39,11 +39,6 @@ is voted on and approved by the Apache ZooKeeper PMC: https://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper -## Java 8 - -If you are going to compile with Java 1.8, you should use a -recent release at u211 or above. - # Contributing We always welcome new contributors to the project! See [How to Contribute](https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute) for details on how to submit patches as pull requests and other aspects of our contribution workflow. diff --git a/zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md b/zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md index 1889faee341..775ad600b4a 100644 --- a/zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md +++ b/zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md @@ -125,8 +125,8 @@ is no full support. #### Required Software -ZooKeeper runs in Java, release 1.8 or greater -(JDK 8 LTS, JDK 11 LTS, JDK 12 - Java 9 and 10 are not supported). +ZooKeeper runs in Java, release 17 or greater +(JDK 17 LTS, JDK 21 LTS, JDK 25 LTS - other Java versions are not supported). It runs as an _ensemble_ of ZooKeeper servers. Three ZooKeeper servers is the minimum recommended size for an ensemble, and we also recommend that they run on separate @@ -1897,11 +1897,7 @@ and [SASL authentication for ZooKeeper](https://cwiki.apache.org/confluence/disp ##### TLS Cipher Suites From 3.5.5 to 3.9 a hard coded default cipher list was used, with the ordering -dependent on whether it is run Java 8 or a later version. - -The list on Java 8 includes TLSv1.2 CBC, GCM and TLSv1.3 ciphers in ordering: *TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256, TLS_CHACHA20_POLY1305_SHA256* - -The list on Java 9+ includes TLSv1.2 GCM, CBC and TLSv1.3 ciphers in ordering: *TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256, TLS_CHACHA20_POLY1305_SHA256* +dependent on whether it was run Java 8 or a later version. Since 3.10 there is no hardcoded list, and the JDK defaults are used.