Skip to content

Commit 9568b07

Browse files
migrate to Java 21 (#1033)
* set openjdk21 in nix * set eclipse-temurin 21 & noble in Dockerfiles - jammy will be removed for Java 22 releases; noble has been default for almost a year * minor canton fork compatibility fix * deprecated URL constructor; use recommended replacement --------- Signed-off-by: Stephen Compall <stephen.compall@digitalasset.com>
1 parent 6feff47 commit 9568b07

File tree

8 files changed

+15
-9
lines changed

8 files changed

+15
-9
lines changed

apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/AnsAuth0FrontendIntegrationTest.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.lfdecentralizedtrust.splice.integration.EnvironmentDefinition
77
import org.lfdecentralizedtrust.splice.util.{FrontendLoginUtil, AnsFrontendTestUtil, WalletTestUtil}
88
import monocle.macros.syntax.lens.*
99

10-
import java.net.URL
10+
import java.net.URI
1111

1212
class AnsAuth0FrontendIntegrationTest
1313
extends FrontendIntegrationTest("alice")
@@ -29,7 +29,9 @@ class AnsAuth0FrontendIntegrationTest
2929
.replace(
3030
Rs256(
3131
sys.env("OIDC_AUTHORITY_VALIDATOR_AUDIENCE"),
32-
new URL(s"https://${sys.env("SPLICE_OAUTH_TEST_AUTHORITY")}/.well-known/jwks.json"),
32+
new URI(
33+
s"https://${sys.env("SPLICE_OAUTH_TEST_AUTHORITY")}/.well-known/jwks.json"
34+
).toURL,
3335
)
3436
)
3537
)(c)

apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/WalletAuth0FrontendIntegrationTest.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import org.lfdecentralizedtrust.splice.util.{
1212
}
1313
import monocle.macros.syntax.lens.*
1414

15-
import java.net.URL
15+
import java.net.URI
1616

1717
class WalletAuth0FrontendIntegrationTest
1818
extends FrontendIntegrationTest("randomUser")
@@ -31,7 +31,9 @@ class WalletAuth0FrontendIntegrationTest
3131
.replace(
3232
Rs256(
3333
sys.env("OIDC_AUTHORITY_VALIDATOR_AUDIENCE"),
34-
new URL(s"https://${sys.env("SPLICE_OAUTH_TEST_AUTHORITY")}/.well-known/jwks.json"),
34+
new URI(
35+
s"https://${sys.env("SPLICE_OAUTH_TEST_AUTHORITY")}/.well-known/jwks.json"
36+
).toURL,
3537
)
3638
)
3739
)(spliceConfig)

canton/community/ledger/ledger-api-core/src/main/scala/com/digitalasset/canton/platform/apiserver/ratelimiting/MemoryCheck.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ object MemoryCheck {
102102
}
103103

104104
// Delegated methods
105+
@deprecated("method deprecated by Java", since = "Java 18")
105106
override def getObjectPendingFinalizationCount: Int = delegate.getObjectPendingFinalizationCount
106107
override def getHeapMemoryUsage: MemoryUsage = delegate.getHeapMemoryUsage
107108
override def getNonHeapMemoryUsage: MemoryUsage = delegate.getNonHeapMemoryUsage

cluster/images/canton/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN ln -s bin/canton splice-image-bin
3434

3535
FROM fullstorydev/grpcurl:v1.9.2 AS grpcurl
3636

37-
FROM eclipse-temurin:17-jdk-jammy
37+
FROM eclipse-temurin:21-jdk-noble
3838
COPY --from=build /usr/bin/tini /usr/bin/tini
3939
COPY --from=build /usr/bin/screen /usr/bin/screen
4040
COPY --from=grpcurl /bin/grpcurl /bin/grpcurl

cluster/images/splice-app/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ RUN mkdir -p /app/splice-node/docs/html/cn-release-bundles
3737
RUN ln -s splice-node/bin/splice-node splice-image-bin
3838

3939
# This Dockerfile is a modified version of Canton's Dockerfile
40-
FROM eclipse-temurin:17-jdk-jammy
40+
FROM eclipse-temurin:21-jdk-noble
4141
COPY --from=build /usr/bin/tini /usr/bin/tini
4242
COPY --from=build /usr/bin/screen /usr/bin/screen
4343
COPY --from=build /app/ /app/

docs/src/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Upcoming
1414
- Deployment
1515

1616
- Fix a typo in the `splice-participant` Helm chart that caused the participant container to be named `participant-1` instead of `participant`.
17+
- Java 21 replaces Java 17 in all Docker images and as the base JDK for building Splice apps.
1718

1819
0.4.1
1920
-----

nix/overlays.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[(self: super: {
2-
openapi-generator-cli = (super.openapi-generator-cli.override { jre = super.openjdk17; }).overrideAttrs(oldAttrs: rec {
2+
openapi-generator-cli = (super.openapi-generator-cli.override { jre = super.openjdk21; }).overrideAttrs(oldAttrs: rec {
33
# 7.0.1 causes some issues in the generated package.json which break module resolution.
44
version = "6.6.0";
55
jarfilename = "${oldAttrs.pname}-${version}.jar";
@@ -8,7 +8,7 @@
88
sha256 = "sha256-lxj/eETolGLHXc2bIKNRNvbbJXv+G4dNseMALpneRgk=";
99
};
1010
});
11-
jre = super.openjdk17;
11+
jre = super.openjdk21;
1212
lnav = super.callPackage ./lnav.nix {};
1313
canton = super.callPackage ./canton.nix {};
1414
cometbft_driver = super.callPackage ./cometbft-driver.nix {};

nix/shell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ in pkgs.mkShell {
4848
nodePackages.node2nix
4949
npmPkgs.syncpack
5050
openapi-generator-cli
51-
openjdk17
51+
openjdk21
5252
pigz
5353
popeye
5454
postgresql_14

0 commit comments

Comments
 (0)