Skip to content

Commit 87f9d44

Browse files
authored
Support Java 23
1 parent c16094b commit 87f9d44

File tree

16 files changed

+128
-69
lines changed

16 files changed

+128
-69
lines changed

azure-pipelines.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
# The dependsOn clauses are:
1717
# * Everything depends on the canary jobs (the main jdk21 jobs), except those jobs themselves.
18-
# * Anything *_jdk11 or *_jdk17 or *_jdk22 depends on *_jdk21.
18+
# * Anything *_jdk11 or *_jdk17 or *_jdk23 depends on *_jdk21.
1919
## TODO: Sometimes jdkXX jobs, for a previous non-LTS version (such as jdk20) are a bit gratuitous.
2020
## They are placeholders for the next non-LTS version (such as jdk22) when it is released.
2121
## Leaving those placeholders will ease the edits to this file.
@@ -29,7 +29,7 @@ jobs:
2929
- typecheck_part1_jdk21
3030
- typecheck_part2_jdk21
3131
- misc_jdk21
32-
- misc_jdk22
32+
- misc_jdk23
3333
pool:
3434
vmImage: 'ubuntu-latest'
3535
steps:
@@ -72,12 +72,12 @@ jobs:
7272
fetchDepth: 25
7373
- bash: ./checker/bin-devel/test-cftests-junit.sh
7474
displayName: test-cftests-junit.sh
75-
- job: junit_jdk22
75+
- job: junit_jdk23
7676
dependsOn:
7777
- canary_jobs
7878
pool:
7979
vmImage: 'ubuntu-latest'
80-
container: mdernst/cf-ubuntu-jdk22:latest
80+
container: mdernst/cf-ubuntu-jdk23:latest
8181
timeoutInMinutes: 70
8282
steps:
8383
- checkout: self
@@ -117,12 +117,12 @@ jobs:
117117
fetchDepth: 25
118118
- bash: ./checker/bin-devel/test-cftests-nonjunit.sh
119119
displayName: test-cftests-nonjunit.sh
120-
- job: nonjunit_jdk22
120+
- job: nonjunit_jdk23
121121
dependsOn:
122122
- canary_jobs
123123
pool:
124124
vmImage: 'ubuntu-latest'
125-
container: mdernst/cf-ubuntu-jdk22:latest
125+
container: mdernst/cf-ubuntu-jdk23:latest
126126
steps:
127127
- checkout: self
128128
fetchDepth: 25
@@ -181,14 +181,14 @@ jobs:
181181
fetchDepth: 25
182182
- bash: ./checker/bin-devel/test-cftests-inference-part2.sh
183183
displayName: test-cftests-inference-part2.sh
184-
- job: inference_jdk22
184+
- job: inference_jdk23
185185
dependsOn:
186186
- canary_jobs
187187
- inference_part1_jdk21
188188
- inference_part2_jdk21
189189
pool:
190190
vmImage: 'ubuntu-latest'
191-
container: mdernst/cf-ubuntu-jdk22:latest
191+
container: mdernst/cf-ubuntu-jdk23:latest
192192
timeoutInMinutes: 90
193193
steps:
194194
- checkout: self
@@ -227,10 +227,10 @@ jobs:
227227
- bash: ./checker/bin-devel/test-misc.sh
228228
displayName: test-misc.sh
229229
# This is a canary job, so it has no `dependsOn`.
230-
- job: misc_jdk22
230+
- job: misc_jdk23
231231
pool:
232232
vmImage: 'ubuntu-latest'
233-
container: mdernst/cf-ubuntu-jdk22-plus:latest
233+
container: mdernst/cf-ubuntu-jdk23-plus:latest
234234
steps:
235235
- checkout: self
236236
fetchDepth: 25
@@ -281,14 +281,14 @@ jobs:
281281
fetchDepth: 1000
282282
- bash: ./checker/bin-devel/test-typecheck-part2.sh
283283
displayName: test-typecheck-part2.sh
284-
- job: typecheck_jdk22
284+
- job: typecheck_jdk23
285285
dependsOn:
286286
- canary_jobs
287287
- typecheck_part1_jdk21
288288
- typecheck_part2_jdk21
289289
pool:
290290
vmImage: 'ubuntu-latest'
291-
container: mdernst/cf-ubuntu-jdk22-plus:latest
291+
container: mdernst/cf-ubuntu-jdk23-plus:latest
292292
steps:
293293
- checkout: self
294294
fetchDepth: 1000
@@ -346,14 +346,14 @@ jobs:
346346
fetchDepth: 25
347347
- bash: ./checker/bin-devel/test-daikon.sh
348348
displayName: test-daikon-part2.sh
349-
- job: daikon_jdk22
349+
- job: daikon_jdk23
350350
dependsOn:
351351
- canary_jobs
352352
- daikon_part1_jdk21
353353
- daikon_part2_jdk21
354354
pool:
355355
vmImage: 'ubuntu-latest'
356-
container: mdernst/cf-ubuntu-jdk22:latest
356+
container: mdernst/cf-ubuntu-jdk23:latest
357357
timeoutInMinutes: 80
358358
steps:
359359
- checkout: self
@@ -404,13 +404,13 @@ jobs:
404404
fetchDepth: 25
405405
- bash: ./checker/bin-devel/test-guava.sh
406406
displayName: test-guava.sh
407-
- job: guava_jdk22
407+
- job: guava_jdk23
408408
dependsOn:
409409
- canary_jobs
410410
- guava_jdk21
411411
pool:
412412
vmImage: 'ubuntu-latest'
413-
container: mdernst/cf-ubuntu-jdk22:latest
413+
container: mdernst/cf-ubuntu-jdk23:latest
414414
timeoutInMinutes: 70
415415
steps:
416416
- checkout: self
@@ -452,13 +452,13 @@ jobs:
452452
fetchDepth: 25
453453
- bash: ./checker/bin-devel/test-plume-lib.sh
454454
displayName: test-plume-lib.sh
455-
- job: plume_lib_jdk22
455+
- job: plume_lib_jdk23
456456
dependsOn:
457457
- canary_jobs
458458
- plume_lib_jdk21
459459
pool:
460460
vmImage: 'ubuntu-latest'
461-
container: mdernst/cf-ubuntu-jdk22:latest
461+
container: mdernst/cf-ubuntu-jdk23:latest
462462
steps:
463463
- checkout: self
464464
fetchDepth: 25
@@ -500,13 +500,13 @@ jobs:
500500
# fetchDepth: 25
501501
# - bash: ./checker/bin-devel/test-downstream.sh
502502
# displayName: test-downstream.sh
503-
# - job: downstream_jdk22
503+
# - job: downstream_jdk23
504504
# dependsOn:
505505
# - canary_jobs
506506
# - downstream_jdk21
507507
# pool:
508508
# vmImage: 'ubuntu-latest'
509-
# container: mdernst/cf-ubuntu-jdk22:latest
509+
# container: mdernst/cf-ubuntu-jdk23:latest
510510
# steps:
511511
# - checkout: self
512512
# fetchDepth: 25

checker/bin-devel/Dockerfile-README

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Create the Docker image:
2424
DOCKERTESTING=""
2525
# DOCKERTESTING="-testing"
2626
alias create_upload_docker_image=' \
27+
( [ -z "$INSIDE_EMACS" ] || (echo "Do not run within Emacs" && false) ) && \
2728
rm -rf dockerdir && \
2829
mkdir -p dockerdir && \
2930
(cd dockerdir && \
@@ -64,12 +65,12 @@ export DPROJECT=cf
6465
create_upload_docker_image
6566

6667
export OS=ubuntu
67-
export JDKVER=jdk22
68+
export JDKVER=jdk23
6869
export DPROJECT=cf
6970
create_upload_docker_image
7071

7172
export OS=ubuntu
72-
export JDKVER=jdk22-plus
73+
export JDKVER=jdk23-plus
7374
export DPROJECT=cf
7475
create_upload_docker_image
7576

checker/bin-devel/Dockerfile-ubuntu-jdk22 renamed to checker/bin-devel/Dockerfile-ubuntu-jdk23

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Create a Docker image that is ready to run the main Checker Framework tests,
2-
# using JDK 22.
2+
# using JDK 23.
33
# (This is OpenJDK, not Oracle JDK. There are different instructions for
44
# installing a LTS release of Java.)
55
# To convert this file to use a newer JDK, search (from the top level of the
6-
# Checker Framework and Annotation Tools repositories) for: (java|jdk).?22\b
6+
# Checker Framework and Annotation Tools repositories) for: (java|jdk).?23\b
77

88
# "ubuntu" is the latest LTS release. "ubuntu:rolling" is the latest release.
99
# See releases at https://hub.docker.com/_/ubuntu for available images.
10-
# See https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=openjdk-22-jdk&searchon=names
10+
# See https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=openjdk-23-jdk&searchon=names
1111
# to see what Ubuntu versions support a particular OpenJDK version.
12-
FROM ubuntu:mantic
12+
FROM ubuntu:oracular
1313
MAINTAINER Michael Ernst <[email protected]>
1414

1515
# According to
@@ -31,7 +31,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
3131
ca-certificates-java \
3232
&& aptitude -y install \
3333
openjdk-17-jdk \
34-
openjdk-22-jdk
34+
openjdk-23-jdk
3535

3636
# Known good combinations of JTReg and the JDK appear at https://builds.shipilev.net/jtreg/ .
3737

checker/bin-devel/Dockerfile-ubuntu-jdk22-plus renamed to checker/bin-devel/Dockerfile-ubuntu-jdk23-plus

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Create a Docker image that is ready to run the full Checker Framework tests,
2-
# including building the manual and Javadoc, using JDK 22.
2+
# including building the manual and Javadoc, using JDK 23.
33
# (This is OpenJDK, not Oracle JDK. There are different instructions for
44
# installing a LTS release of Java.)
55
# To convert this file to use a newer JDK, search (from the top level of the
6-
# Checker Framework and Annotation Tools repositories) for: (java|jdk).?22\b
6+
# Checker Framework and Annotation Tools repositories) for: (java|jdk).?23\b
77

88
# "ubuntu" is the latest LTS release. "ubuntu:rolling" is the latest release.
99
# See releases at https://hub.docker.com/_/ubuntu for available images.
10-
# See https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=openjdk-22-jdk&searchon=names
10+
# See https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=openjdk-23-jdk&searchon=names
1111
# to see what Ubuntu versions support a particular OpenJDK version.
12-
FROM ubuntu:mantic
12+
FROM ubuntu:oracular
1313
MAINTAINER Michael Ernst <[email protected]>
1414

1515
# According to
@@ -31,7 +31,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
3131
ca-certificates-java \
3232
&& aptitude -y install \
3333
openjdk-17-jdk \
34-
openjdk-22-jdk
34+
openjdk-23-jdk
3535

3636
# Known good combinations of JTReg and the JDK appear at https://builds.shipilev.net/jtreg/ .
3737

checker/bin/wpi-many.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ else
8080
has_java21="yes"
8181
fi
8282

83-
# shellcheck disable=SC2153 # testing for JAVA22_HOME, not a typo of JAVA_HOME
84-
if [ "${JAVA22_HOME}" = "" ]; then
85-
has_java22="no"
83+
# shellcheck disable=SC2153 # testing for JAVA23_HOME, not a typo of JAVA_HOME
84+
if [ "${JAVA23_HOME}" = "" ]; then
85+
has_java23="no"
8686
else
87-
has_java22="yes"
87+
has_java23="yes"
8888
fi
8989

9090
if [ "${has_java_home}" = "yes" ] && [ ! -d "${JAVA_HOME}" ]; then
@@ -110,9 +110,9 @@ if [ "${has_java_home}" = "yes" ]; then
110110
export JAVA21_HOME="${JAVA_HOME}"
111111
has_java21="yes"
112112
fi
113-
if [ "${has_java22}" = "no" ] && [ "${java_version}" = 22 ]; then
114-
export JAVA22_HOME="${JAVA_HOME}"
115-
has_java22="yes"
113+
if [ "${has_java23}" = "no" ] && [ "${java_version}" = 23 ]; then
114+
export JAVA23_HOME="${JAVA_HOME}"
115+
has_java23="yes"
116116
fi
117117
fi
118118

@@ -136,23 +136,23 @@ if [ "${has_java21}" = "yes" ] && [ ! -d "${JAVA21_HOME}" ]; then
136136
exit 1
137137
fi
138138

139-
if [ "${has_java22}" = "yes" ] && [ ! -d "${JAVA22_HOME}" ]; then
140-
echo "JAVA22_HOME is set to a non-existent directory ${JAVA22_HOME}"
139+
if [ "${has_java23}" = "yes" ] && [ ! -d "${JAVA23_HOME}" ]; then
140+
echo "JAVA23_HOME is set to a non-existent directory ${JAVA23_HOME}"
141141
exit 1
142142
fi
143143

144-
if [ "${has_java8}" = "no" ] && [ "${has_java11}" = "no" ] && [ "${has_java17}" = "no" ] && [ "${has_java21}" = "no" ] && [ "${has_java22}" = "no" ]; then
144+
if [ "${has_java8}" = "no" ] && [ "${has_java11}" = "no" ] && [ "${has_java17}" = "no" ] && [ "${has_java21}" = "no" ] && [ "${has_java23}" = "no" ]; then
145145
if [ "${has_java_home}" = "yes" ]; then
146146
echo "Cannot determine Java version from JAVA_HOME"
147147
else
148-
echo "No Java 8, 11, 17, 21, or 22 JDKs found. At least one of JAVA_HOME, JAVA8_HOME, JAVA11_HOME, JAVA17_HOME, JAVA21_HOME, or JAVA22_HOME must be set."
148+
echo "No Java 8, 11, 17, 21, or 23 JDKs found. At least one of JAVA_HOME, JAVA8_HOME, JAVA11_HOME, JAVA17_HOME, JAVA21_HOME, or JAVA23_HOME must be set."
149149
fi
150150
echo "JAVA_HOME = ${JAVA_HOME}"
151151
echo "JAVA8_HOME = ${JAVA8_HOME}"
152152
echo "JAVA11_HOME = ${JAVA11_HOME}"
153153
echo "JAVA17_HOME = ${JAVA17_HOME}"
154154
echo "JAVA21_HOME = ${JAVA21_HOME}"
155-
echo "JAVA22_HOME = ${JAVA22_HOME}"
155+
echo "JAVA23_HOME = ${JAVA23_HOME}"
156156
command -v java
157157
java -version
158158
exit 1

checker/bin/wpi.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ else
7575
has_java21="yes"
7676
fi
7777

78-
# shellcheck disable=SC2153 # testing for JAVA22_HOME, not a typo of JAVA_HOME
79-
if [ "${JAVA22_HOME}" = "" ]; then
80-
has_java22="no"
78+
# shellcheck disable=SC2153 # testing for JAVA23_HOME, not a typo of JAVA_HOME
79+
if [ "${JAVA23_HOME}" = "" ]; then
80+
has_java23="no"
8181
else
82-
has_java22="yes"
82+
has_java23="yes"
8383
fi
8484

8585
if [ "${has_java_home}" = "yes" ] && [ ! -d "${JAVA_HOME}" ]; then
@@ -105,9 +105,9 @@ if [ "${has_java_home}" = "yes" ]; then
105105
export JAVA21_HOME="${JAVA_HOME}"
106106
has_java21="yes"
107107
fi
108-
if [ "${has_java22}" = "no" ] && [ "${java_version}" = 22 ]; then
109-
export JAVA22_HOME="${JAVA_HOME}"
110-
has_java22="yes"
108+
if [ "${has_java23}" = "no" ] && [ "${java_version}" = 23 ]; then
109+
export JAVA23_HOME="${JAVA_HOME}"
110+
has_java23="yes"
111111
fi
112112
fi
113113

@@ -131,23 +131,23 @@ if [ "${has_java21}" = "yes" ] && [ ! -d "${JAVA21_HOME}" ]; then
131131
exit 9
132132
fi
133133

134-
if [ "${has_java22}" = "yes" ] && [ ! -d "${JAVA22_HOME}" ]; then
135-
echo "JAVA22_HOME is set to a non-existent directory ${JAVA22_HOME}"
134+
if [ "${has_java23}" = "yes" ] && [ ! -d "${JAVA23_HOME}" ]; then
135+
echo "JAVA23_HOME is set to a non-existent directory ${JAVA23_HOME}"
136136
exit 10
137137
fi
138138

139-
if [ "${has_java8}" = "no" ] && [ "${has_java11}" = "no" ] && [ "${has_java17}" = "no" ] && [ "${has_java21}" = "no" ] && [ "${has_java22}" = "no" ]; then
139+
if [ "${has_java8}" = "no" ] && [ "${has_java11}" = "no" ] && [ "${has_java17}" = "no" ] && [ "${has_java21}" = "no" ] && [ "${has_java23}" = "no" ]; then
140140
if [ "${has_java_home}" = "yes" ]; then
141141
echo "Cannot determine Java version from JAVA_HOME"
142142
else
143-
echo "No Java 8, 11, 17, 21, or 22 JDKs found. At least one of JAVA_HOME, JAVA8_HOME, JAVA11_HOME, JAVA17_HOME, JAVA21_HOME, or JAVA22_HOME must be set."
143+
echo "No Java 8, 11, 17, 21, or 23 JDKs found. At least one of JAVA_HOME, JAVA8_HOME, JAVA11_HOME, JAVA17_HOME, JAVA21_HOME, or JAVA23_HOME must be set."
144144
fi
145145
echo "JAVA_HOME = ${JAVA_HOME}"
146146
echo "JAVA8_HOME = ${JAVA8_HOME}"
147147
echo "JAVA11_HOME = ${JAVA11_HOME}"
148148
echo "JAVA17_HOME = ${JAVA17_HOME}"
149149
echo "JAVA21_HOME = ${JAVA21_HOME}"
150-
echo "JAVA22_HOME = ${JAVA22_HOME}"
150+
echo "JAVA23_HOME = ${JAVA23_HOME}"
151151
command -v java
152152
java -version
153153
exit 11

checker/src/main/java/org/checkerframework/checker/optional/OptionalVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ public Void visitVariable(VariableTree tree, Void p) {
505505
* {@code x = Optional.of(Optional.of("baz"));}. However, the type of the right-hand side is
506506
* {@code Optional<? extends Object>}, not {@code Optional<Optional<String>>}. Therefore, to fully
507507
* check for improper types, it is necessary to examine, in the type checker, the argument to
508-
* construction of an Optional. Method {@link handleNestedOptionalCreation} does so.
508+
* construction of an Optional. Method {@link #handleNestedOptionalCreation} does so.
509509
*/
510510
private final class OptionalTypeValidator extends BaseTypeValidator {
511511

checker/tests/i18n-formatter/Syntax.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ public static void invalidSubformatPattern() {
8383
MessageFormat.format("{0, number, #.#.#}", 1);
8484
// :: error: (i18nformat.string)
8585
MessageFormat.format("{0, date, y.m.d.x}", new Date());
86-
// :: error: (i18nformat.string)
87-
MessageFormat.format("{0, choice, 0##zero}", 0);
86+
// This seems to be permitted by Java 23.
87+
// // :: error: (i18nformat.string)
88+
// MessageFormat.format("{0, choice, 0##zero}", 0);
8889

8990
// good
9091
MessageFormat.format("{0, number, #.#}", 1);

checker/tests/wpi-many/testin.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
https://github.com/kelloggm/wpi-many-tests-bcel-util a67f0cd3f59f621cffd0567306df55766f17550a
2-
https://github.com/kelloggm/wpi-many-tests-bibtex-clean 43e0372475bf8d08522197b5b50196e8176b658b
3-
https://github.com/kelloggm/wpi-many-tests-ensures-called-methods 5f39f1e5ad364900b5542438bae0a562db230d20
4-
https://github.com/kelloggm/wpi-many-tests-html-pretty-print c3ce7959c68c1ecc40d8c85c31080bcc59f2854e
5-
https://github.com/kelloggm/-wpi-many-tests-bibtex-clean 8e0d2c17240056ccd7d45efa272fb364aa482617
1+
https://github.com/kelloggm/wpi-many-tests-bcel-util 91415634c1d47ada93de4fb9105bbd7817928a58
2+
https://github.com/kelloggm/wpi-many-tests-bibtex-clean fe7ae9a276d8d392c174d497c14a7bf4f30876e8
3+
https://github.com/kelloggm/wpi-many-tests-ensures-called-methods e5ad4c582392ee8edd8a6270b12aad876df94782
4+
https://github.com/kelloggm/wpi-many-tests-html-pretty-print de5790094a1b3cece9cd97152a5c54afa615e6d9
5+
https://github.com/kelloggm/-wpi-many-tests-bibtex-clean 4da53d845f91e5a34987f70227ec6e5b11e8fc60
66
# This comment line tests that the commenting feature works (if it doesn't, then this line will be read and fail, as it's not a URL).
77
https://github.com/Nargeshdb/wpi-many-tests-owning-field f446e987fdb87a4c8364c9a2728be70900cb30d5

dataflow/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ dependencies {
1010
// Node implements org.plumelib.util.UniqueId, so this dependency must be "api".
1111
api "org.plumelib:plume-util:${versions.plumeUtil}"
1212

13+
implementation "org.plumelib:hashmap-util:${versions.hashmapUtil}"
14+
1315
// External dependencies:
1416
// If you add an external dependency, you must shadow its packages both in the dataflow-shaded
1517
// artifact (see shadowJar block below) and also in checker.jar (see the comment in

0 commit comments

Comments
 (0)