Skip to content

Commit 12d4cb4

Browse files
authored
ZOOKEEPER-5039: Raise to min JDK 17, also build, test with JDK25
Reviewers: kgeisz, anmolnar, anmolnar, tamaashu Author: PDavid Closes #2376 from PDavid/ZOOKEEPER-5039-mockito-upgrade
1 parent 981a2fd commit 12d4cb4

16 files changed

Lines changed: 127 additions & 71 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ jobs:
3232
strategy:
3333
matrix:
3434
profile:
35-
- name: 'full-build-jdk8'
36-
jdk: 8
35+
- name: 'full-build-jdk17'
36+
jdk: 17
3737
args: '-Pfull-build apache-rat:check verify -DskipTests spotbugs:check checkstyle:check'
38-
- name: 'full-build-jdk11'
39-
jdk: 11
38+
- name: 'full-build-jdk25'
39+
jdk: 25
4040
args: '-Pfull-build apache-rat:check verify -DskipTests spotbugs:check checkstyle:check'
4141
- name: 'full-build-java-tests'
42-
jdk: 11
42+
jdk: 25
4343
args: '-Pfull-build verify -Dsurefire-forkcount=1 -DskipCppUnit -Dsurefire.rerunFailingTestsCount=5'
4444
- name: 'full-build-cppunit-tests'
45-
jdk: 11
45+
jdk: 25
4646
args: '-Pfull-build verify -Dtest=_ -DfailIfNoTests=false'
4747
fail-fast: false
4848
timeout-minutes: 360

.github/workflows/e2e.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
compatibility:
2626
strategy:
2727
matrix:
28-
jdk: [8, 11]
29-
zk: [3.5.9, 3.6.3, 3.7.0, nightly]
28+
jdk: [17, 25]
29+
zk: [3.7.2, 3.8.6, 3.9.5, nightly]
3030
fail-fast: false
3131
timeout-minutes: 360
3232
runs-on: ubuntu-latest

.github/workflows/manual.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ jobs:
4646
- uses: actions/checkout@v6
4747
with:
4848
ref: ${{ github.event.inputs.buildRef }}
49-
- name: Set up JDK 11
49+
- name: Set up JDK 17
5050
uses: actions/setup-java@v5
5151
with:
52-
java-version: 11
52+
java-version: 17
5353
distribution: temurin
5454
cache: 'maven'
5555
- name: Show the first log message

.github/workflows/website.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- uses: actions/checkout@v6
36-
- name: Set up JDK 11
36+
- name: Set up JDK 25
3737
uses: actions/setup-java@v5
3838
with:
39-
java-version: 11
39+
java-version: 25
4040
distribution: temurin
4141
cache: 'maven'
4242
- name: Set up Node.js 22

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pipeline {
3939
axes {
4040
axis {
4141
name 'JAVA_VERSION'
42-
values 'jdk_1.8_latest', 'jdk_11_latest'
42+
values 'jdk_17_latest', 'jdk_25_latest'
4343
}
4444
}
4545

Jenkinsfile-PreCommit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pipeline {
3030

3131
tools {
3232
maven "maven_latest"
33-
jdk "jdk_1.8_latest"
33+
jdk "jdk_17_latest"
3434
}
3535

3636
stages {

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<p align="left">
44
<a href="https://zookeeper.apache.org/">
5-
<img src="https://zookeeper.apache.org/images/zookeeper_small.gif"" alt="https://zookeeper.apache.org/"><br/>
5+
<img src="https://zookeeper.apache.org/images/zookeeper_small.gif" alt="https://zookeeper.apache.org/"><br/>
66
</a>
77
</p>
88

@@ -39,11 +39,6 @@ is voted on and approved by the Apache ZooKeeper PMC:
3939

4040
https://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper
4141

42-
## Java 8
43-
44-
If you are going to compile with Java 1.8, you should use a
45-
recent release at u211 or above.
46-
4742
# Contributing
4843
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.
4944

dev/docker/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# under the License.
1818
#
1919

20-
FROM maven:3.8.4-jdk-11
20+
FROM maven:3.8.8-eclipse-temurin-17
2121

2222
RUN apt-get update
2323
RUN apt-get install -y \
@@ -31,4 +31,5 @@ RUN apt-get install -y \
3131
libssl-dev \
3232
libsasl2-modules-gssapi-mit \
3333
libsasl2-modules \
34-
libsasl2-dev
34+
libsasl2-dev \
35+
gnupg

dev/docker/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# About
2+
3+
Just run `dev/docker/run.sh` and you will have a Linux environment with all that is needed to build ZooKeeper, even on MacOs.

excludeFindBugsFilter.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,23 @@
77
<!-- this problem is to be addressed in ZOOKEEPER-3227 -->
88
<Bug pattern="DM_DEFAULT_ENCODING"/>
99

10+
<!-- newly detected by SpotBugs 4.9.3; pre-existing code, not regressions -->
11+
<Bug pattern="EI_EXPOSE_REP"/>
12+
<Bug pattern="EI_EXPOSE_REP2"/>
13+
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
14+
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE"/>
15+
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE"/>
16+
<Bug pattern="AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE"/>
17+
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
18+
<Bug pattern="DCN_NULLPOINTER_EXCEPTION"/>
19+
<Bug pattern="US_USELESS_SUPPRESSION_ON_METHOD"/>
20+
<Bug pattern="US_USELESS_SUPPRESSION_ON_CLASS"/>
21+
<Bug pattern="US_USELESS_SUPPRESSION_ON_FIELD"/>
22+
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/>
23+
<Bug pattern="SS_SHOULD_BE_STATIC"/>
24+
<Bug pattern="NP_UNWRITTEN_FIELD"/>
25+
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR"/>
26+
<Bug pattern="MS_EXPOSE_REP"/>
27+
1028
</FindBugsFilter>
1129

0 commit comments

Comments
 (0)