diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index b375801e97..deb5a2c193 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -17,7 +17,7 @@ concurrency: cancel-in-progress: true env: - JAVA_VERSION: '17' + JAVA_VERSION: '21' CONTAINER_REGISTRY_URL: 'ghcr.io/infonl' APPLICATION_NAME: 'zaakafhandelcomponent' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1b8b66b5f8..20a25c2874 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -16,7 +16,7 @@ on: - cron: "21 11 * * 0" env: - JAVA_VERSION: "17" + JAVA_VERSION: "21" jobs: analyze: diff --git a/Dockerfile b/Dockerfile index 54d2d454e9..a8c0717264 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ### Create runtime image fase -FROM docker.io/eclipse-temurin:17-jre-focal as runtime +FROM docker.io/eclipse-temurin:21-jre-alpine as runtime # Import certificates into Java truststore ADD certificates /certificates @@ -12,7 +12,7 @@ RUN keytool -importcert -cacerts -alias Staat_der_Nederlanden_Private_Services_C COPY target/zaakafhandelcomponent.jar / # Copy build timestamp (used by HealthCheckService.java) -RUN date --iso-8601='seconds' > /build_timestamp.txt +RUN date -Iseconds > /build_timestamp.txt # Start zaakafhandelcomponent ENTRYPOINT ["java", "--enable-preview", "-jar", "zaakafhandelcomponent.jar"] diff --git a/build.gradle.kts b/build.gradle.kts index de221d17c2..f2ebb4d91b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,8 +34,9 @@ repositories { group = "net.atos.common-ground" description = "Zaakafhandelcomponent" -// we will only upgrade Java when WildFly explicitly supports a new version -val javaVersion = JavaVersion.VERSION_17 +// make sure the Java version is supported by WildFly +// and update our base Docker image and JDK versions in our GitHubs workflows accordingly +val javaVersion = JavaVersion.VERSION_21 val zacDockerImage by extra { if (project.hasProperty("zacDockerImage")) { @@ -166,7 +167,7 @@ detekt { } jacoco { - toolVersion = "0.8.7" + toolVersion = "0.8.11" } java { @@ -301,7 +302,6 @@ tasks { withType { options.encoding = "UTF-8" - options.compilerArgs.add("--enable-preview") } withType { diff --git a/docs/development/INSTALL.md b/docs/development/INSTALL.md index 1bec48716f..ac0dcfb345 100644 --- a/docs/development/INSTALL.md +++ b/docs/development/INSTALL.md @@ -7,7 +7,7 @@ General ZAC usage instructions may be found in the [README.md](../../README.md) ### Prerequisites -- Java JDK 17 (we use the `Temurin` distribution) +- Java JDK 21 (we use the `Temurin` distribution) ### Gradle build @@ -72,7 +72,7 @@ When opening the ZAC project in IntelliJ make sure to select 'Open as Gradle pro #### Prerequisites First you will need to set up IntelliJ for ZAC: -1. Install and use JDK 17 (we use the `Temurin` distribution). +1. Install and use the correct JDK distribution (see above). 2. Follow the [local WildFly instructions](../../scripts/wildfly/README.md) and install `WildFly`. 3. Enable the built-in IntelliJ WildFly extension if not already enabled (note that this requires the IntelliJ Enterprise Edition). 4. Create a run configuration using the WildFly extension for ZAC using the `JBoss/Wildfly Server - local` template. diff --git a/src/main/java/net/atos/zac/app/klanten/converter/RESTPersoonConverter.java b/src/main/java/net/atos/zac/app/klanten/converter/RESTPersoonConverter.java index fd01ecea8a..b882978d6e 100644 --- a/src/main/java/net/atos/zac/app/klanten/converter/RESTPersoonConverter.java +++ b/src/main/java/net/atos/zac/app/klanten/converter/RESTPersoonConverter.java @@ -201,9 +201,9 @@ private String convertGeboortedatum(final AbstractDatum abstractDatum) { private String convertVerblijfplaats(final AbstractVerblijfplaats abstractVerblijfplaats) { return switch (abstractVerblijfplaats) { - case Adres adres && adres.getVerblijfadres() != null -> + case Adres adres when adres.getVerblijfadres() != null -> convertVerblijfadresBinnenland(adres.getVerblijfadres()); - case VerblijfplaatsBuitenland verblijfplaatsBuitenland && verblijfplaatsBuitenland.getVerblijfadres() != null -> + case VerblijfplaatsBuitenland verblijfplaatsBuitenland when verblijfplaatsBuitenland.getVerblijfadres() != null -> convertVerblijfadresBuitenland(verblijfplaatsBuitenland.getVerblijfadres()); case VerblijfplaatsOnbekend verblijfplaatsOnbekend -> ONBEKEND; default -> null; diff --git a/src/main/java/net/atos/zac/mailtemplates/MailTemplateHelper.java b/src/main/java/net/atos/zac/mailtemplates/MailTemplateHelper.java index 856f6174fd..7f3666f3d6 100644 --- a/src/main/java/net/atos/zac/mailtemplates/MailTemplateHelper.java +++ b/src/main/java/net/atos/zac/mailtemplates/MailTemplateHelper.java @@ -278,8 +278,8 @@ private static String replaceInitiatorVariabelenResultaatItem(final String resol private static String convertAdres(final Persoon persoon) { return switch (persoon.getVerblijfplaats()) { - case Adres adres && adres.getVerblijfadres() != null -> convertAdres(adres.getVerblijfadres()); - case VerblijfplaatsBuitenland verblijfplaatsBuitenland && verblijfplaatsBuitenland.getVerblijfadres() != null -> + case Adres adres when adres.getVerblijfadres() != null -> convertAdres(adres.getVerblijfadres()); + case VerblijfplaatsBuitenland verblijfplaatsBuitenland when verblijfplaatsBuitenland.getVerblijfadres() != null -> convertAdres(verblijfplaatsBuitenland.getVerblijfadres()); default -> EMPTY; };