Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit 5ee98ee

Browse filesBrowse files
authored
chore: migrate to java 21 (TheAlgorithms#5163)
1 parent d77d901 commit 5ee98ee
Copy full SHA for 5ee98ee

File tree

Expand file treeCollapse file tree

6 files changed

+14
-12
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

6 files changed

+14
-12
lines changed
Open diff view settings
Collapse file

‎.devcontainer/Dockerfile‎

Copy file name to clipboardExpand all lines: .devcontainer/Dockerfile
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/java/.devcontainer/base.Dockerfile
22

33
# [Choice] Java version (use -bullseye variants on local arm64/Apple Silicon): 11, 17, 11-bullseye, 17-bullseye, 11-buster, 17-buster
4-
ARG VARIANT="17-bullseye"
5-
FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
4+
ARG VARIANT="21-bullseye"
5+
FROM mcr.microsoft.com/vscode/devcontainers/java:1.1.0-${VARIANT}
66

77
# [Option] Install Maven
88
ARG INSTALL_MAVEN="false"
Collapse file

‎.devcontainer/devcontainer.json‎

Copy file name to clipboardExpand all lines: .devcontainer/devcontainer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// Update the VARIANT arg to pick a Java version: 11, 17
99
// Append -bullseye or -buster to pin to an OS version.
1010
// Use the -bullseye variants on local arm64/Apple Silicon.
11-
"VARIANT": "17-bullseye",
11+
"VARIANT": "21-bullseye",
1212
// Options
1313
"INSTALL_MAVEN": "true",
1414
"INSTALL_GRADLE": "true",
Collapse file

‎.github/workflows/build.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/build.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v4
9-
- name: Set up JDK 17
9+
- name: Set up JDK
1010
uses: actions/setup-java@v4
1111
with:
12-
java-version: 17
12+
java-version: 21
1313
distribution: 'adopt'
1414
- name: Build with Maven
1515
run: mvn --batch-mode --update-snapshots verify
Collapse file

‎.github/workflows/codeql.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/codeql.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
- name: Checkout repository
2727
uses: actions/checkout@v4
2828

29-
- name: Set up JDK 17
29+
- name: Set up JDK
3030
uses: actions/setup-java@v4
3131
with:
32-
java-version: 17
32+
java-version: 21
3333
distribution: 'adopt'
3434

3535
- name: Initialize CodeQL
Collapse file

‎.gitpod.dockerfile‎

Copy file name to clipboardExpand all lines: .gitpod.dockerfile
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM gitpod/workspace-java-17:2024-05-13-09-12-40
1+
FROM gitpod/workspace-java-21:2024-05-15-13-36-34
22

33
ENV LLVM_SCRIPT="tmp_llvm.sh"
44

Collapse file

‎pom.xml‎

Copy file name to clipboardExpand all lines: pom.xml
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13-
<maven.compiler.source>17</maven.compiler.source>
14-
<maven.compiler.target>17</maven.compiler.target>
13+
<maven.compiler.source>21</maven.compiler.source>
14+
<maven.compiler.target>21</maven.compiler.target>
1515
<assertj.version>3.25.3</assertj.version>
1616
</properties>
1717

@@ -73,15 +73,17 @@
7373
<artifactId>maven-compiler-plugin</artifactId>
7474
<version>3.13.0</version>
7575
<configuration>
76-
<source>17</source>
77-
<target>17</target>
76+
<source>21</source>
77+
<target>21</target>
7878
<compilerArgs>
7979
<arg>-Xlint:all</arg>
8080
<arg>-Xlint:-auxiliaryclass</arg>
8181
<arg>-Xlint:-rawtypes</arg>
8282
<arg>-Xlint:-serial</arg>
8383
<arg>-Xlint:-try</arg>
8484
<arg>-Xlint:-unchecked</arg>
85+
<arg>-Xlint:-lossy-conversions</arg>
86+
<arg>-Xlint:-this-escape</arg>
8587
<arg>-Werror</arg>
8688
</compilerArgs>
8789
</configuration>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.