Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile-PreCommit
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pipeline {

tools {
maven "maven_latest"
jdk "jdk_1.8_latest"
jdk "jdk_17_latest"
}

stages {
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="left">
<a href="https://zookeeper.apache.org/">
<img src="https://zookeeper.apache.org/images/zookeeper_small.gif"" alt="https://zookeeper.apache.org/"><br/>
<img src="https://zookeeper.apache.org/images/zookeeper_small.gif" alt="https://zookeeper.apache.org/"><br/>
</a>
</p>

Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion dev/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

FROM maven:3.8.4-jdk-11
FROM maven:3.9.6-eclipse-temurin-17
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Also update Maven to 3.9.6 - it includes several improvements.


RUN apt-get update
RUN apt-get install -y \
Expand Down
18 changes: 18 additions & 0 deletions excludeFindBugsFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,23 @@
<!-- this problem is to be addressed in ZOOKEEPER-3227 -->
<Bug pattern="DM_DEFAULT_ENCODING"/>

<!-- newly detected by SpotBugs 4.9.3; pre-existing code, not regressions -->
<Bug pattern="EI_EXPOSE_REP"/>
<Bug pattern="EI_EXPOSE_REP2"/>
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE"/>
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE"/>
<Bug pattern="AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE"/>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Bug pattern="DCN_NULLPOINTER_EXCEPTION"/>
<Bug pattern="US_USELESS_SUPPRESSION_ON_METHOD"/>
<Bug pattern="US_USELESS_SUPPRESSION_ON_CLASS"/>
<Bug pattern="US_USELESS_SUPPRESSION_ON_FIELD"/>
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/>
<Bug pattern="SS_SHOULD_BE_STATIC"/>
<Bug pattern="NP_UNWRITTEN_FIELD"/>
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR"/>
<Bug pattern="MS_EXPOSE_REP"/>
Comment on lines +11 to +26
Copy link
Copy Markdown
Contributor Author

@PDavid PDavid May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this suppression list are very broad. They are including real concurrency bugs (AT_STALE_THREAD_WRITE_OF_PRIMITIVE, AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE) and design issues (CT_CONSTRUCTOR_THROW, EI_EXPOSE_REP). Should we create a follow-up Jira to triage
and fix these incrementally?

Or should we suppress these by class so that these are not suppressed everywhere? We have 198 class/pattern combinations across these 16 patterns.


</FindBugsFilter>

58 changes: 34 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,6 @@
<name>m2e.version</name>
</property>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
<build>
<pluginManagement>
<plugins>
Expand Down Expand Up @@ -436,15 +433,6 @@
</pluginManagement>
</build>
</profile>
<profile>
<id>jdk-release-flag</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
</profile>
<profile>
<id>clover</id>
<activation>
Expand Down Expand Up @@ -540,8 +528,7 @@

<properties>
<!-- maven properties -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<project.build.outputTimestamp>1691130453</project.build.outputTimestamp>
<dependency.locations.enabled>false</dependency.locations.enabled>
<surefire.version>2.22.1</surefire.version>
Expand All @@ -556,7 +543,7 @@
<jmockit.version>1.48</jmockit.version>
<junit.version>5.6.2</junit.version>
<junit-platform.version>1.6.2</junit-platform.version>
<mockito.version>4.9.0</mockito.version>
<mockito.version>5.23.0</mockito.version>
<hamcrest.version>2.2</hamcrest.version>
<commons-cli.version>1.5.0</commons-cli.version>
<netty.version>4.1.130.Final</netty.version>
Expand All @@ -568,11 +555,11 @@
<bouncycastle.version>1.78</bouncycastle.version>
<commons-collections.version>4.4</commons-collections.version>
<dropwizard.version>4.1.12.1</dropwizard.version>
<spotbugsannotations.version>4.0.2</spotbugsannotations.version>
<spotbugsannotations.version>4.9.3</spotbugsannotations.version>
<checkstyle.version>8.39</checkstyle.version>
<enforcer.version>3.0.0-M3</enforcer.version>
<commons-io.version>2.17.0</commons-io.version>
<burningwave.mockdns.version>0.25.4</burningwave.mockdns.version>
<burningwave.mockdns.version>0.27.2</burningwave.mockdns.version>
<dnsjava.version>3.5.1</dnsjava.version>
<clover-maven-plugin.version>4.4.1</clover-maven-plugin.version>
<sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
Expand Down Expand Up @@ -704,12 +691,6 @@
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
Expand Down Expand Up @@ -887,10 +868,39 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.0.0</version>
<version>4.9.3.0</version>
<configuration>
<excludeFilterFile>excludeFindBugsFilter.xml</excludeFilterFile>
</configuration>
<dependencies>
<!-- Override ASM version to support JDK 25 (class file version 69)
TODO: Remove this override when future SpotBugs version bundles ASM 9.9+ -->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.9.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-analysis</artifactId>
<version>9.9.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>9.9.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>9.9.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<version>9.9.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
Expand Down
10 changes: 3 additions & 7 deletions zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions zookeeper-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,6 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
Expand Down
Loading