From 5ee98eeb48aae1b016780370e3164b6922ab8839 Mon Sep 17 00:00:00 2001
From: Piotr Idzik <65706193+vil02@users.noreply.github.com>
Date: Sun, 19 May 2024 20:57:07 +0200
Subject: [PATCH] chore: migrate to java 21 (#5163)
---
.devcontainer/Dockerfile | 4 ++--
.devcontainer/devcontainer.json | 2 +-
.github/workflows/build.yml | 4 ++--
.github/workflows/codeql.yml | 4 ++--
.gitpod.dockerfile | 2 +-
pom.xml | 10 ++++++----
6 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 7b319b78..bcea8e79 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,8 +1,8 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/java/.devcontainer/base.Dockerfile
# [Choice] Java version (use -bullseye variants on local arm64/Apple Silicon): 11, 17, 11-bullseye, 17-bullseye, 11-buster, 17-buster
-ARG VARIANT="17-bullseye"
-FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
+ARG VARIANT="21-bullseye"
+FROM mcr.microsoft.com/vscode/devcontainers/java:1.1.0-${VARIANT}
# [Option] Install Maven
ARG INSTALL_MAVEN="false"
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 3994bec7..fdc7cdbd 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -8,7 +8,7 @@
// Update the VARIANT arg to pick a Java version: 11, 17
// Append -bullseye or -buster to pin to an OS version.
// Use the -bullseye variants on local arm64/Apple Silicon.
- "VARIANT": "17-bullseye",
+ "VARIANT": "21-bullseye",
// Options
"INSTALL_MAVEN": "true",
"INSTALL_GRADLE": "true",
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index faf5dd6a..14a4ce5f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -6,10 +6,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - name: Set up JDK 17
+ - name: Set up JDK
uses: actions/setup-java@v4
with:
- java-version: 17
+ java-version: 21
distribution: 'adopt'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index f447eb95..ff76b1af 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -26,10 +26,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- - name: Set up JDK 17
+ - name: Set up JDK
uses: actions/setup-java@v4
with:
- java-version: 17
+ java-version: 21
distribution: 'adopt'
- name: Initialize CodeQL
diff --git a/.gitpod.dockerfile b/.gitpod.dockerfile
index 1f0020db..0bba1827 100644
--- a/.gitpod.dockerfile
+++ b/.gitpod.dockerfile
@@ -1,4 +1,4 @@
-FROM gitpod/workspace-java-17:2024-05-13-09-12-40
+FROM gitpod/workspace-java-21:2024-05-15-13-36-34
ENV LLVM_SCRIPT="tmp_llvm.sh"
diff --git a/pom.xml b/pom.xml
index 1ba57f57..2c2f640d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,8 +10,8 @@
UTF-8
- 17
- 17
+ 21
+ 21
3.25.3
@@ -73,8 +73,8 @@
maven-compiler-plugin
3.13.0
-
- 17
+
+ 21
-Xlint:all
-Xlint:-auxiliaryclass
@@ -82,6 +82,8 @@
-Xlint:-serial
-Xlint:-try
-Xlint:-unchecked
+ -Xlint:-lossy-conversions
+ -Xlint:-this-escape
-Werror