Skip to content

Commit 218eea9

Browse files
committed
chore: upgrade to JDK21
1 parent 82c211d commit 218eea9

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
eclipse.preferences.version=1
2-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
3-
org.eclipse.jdt.core.compiler.compliance=17
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
3+
org.eclipse.jdt.core.compiler.compliance=21
44
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
55
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
66
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
77
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
88
org.eclipse.jdt.core.compiler.release=enabled
9-
org.eclipse.jdt.core.compiler.source=17
9+
org.eclipse.jdt.core.compiler.source=21
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
eclipse.preferences.version=1
2-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
3-
org.eclipse.jdt.core.compiler.compliance=17
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
3+
org.eclipse.jdt.core.compiler.compliance=21
44
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
55
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
66
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
77
org.eclipse.jdt.core.compiler.processAnnotations=disabled
88
org.eclipse.jdt.core.compiler.release=disabled
9-
org.eclipse.jdt.core.compiler.source=17
9+
org.eclipse.jdt.core.compiler.source=21

plugin/updater/src/main/java/updater/AbstractSourceHandler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import static updater.utils.Validation.isURL;
1212

1313
import java.io.IOException;
14-
import java.net.URL;
14+
import java.net.URI;
1515
import java.nio.file.Files;
1616
import java.nio.file.Path;
1717
import java.util.Map;
@@ -54,7 +54,7 @@ record DownloadContext(String targetNamePrefix, boolean updateExistingFiles, Pat
5454
void downloadExampleFile(final DownloadContext ctx, final String examplePathOrURL) throws IOException {
5555
if (examplePathOrURL != null) {
5656
if (isURL(examplePathOrURL)) {
57-
final var sourceURL = new URL(examplePathOrURL);
57+
final var sourceURL = URI.create(examplePathOrURL).toURL();
5858
final var targetFile = ctx.targetDir.resolve(ctx.targetNamePrefix + ".example." + getFileExtension(sourceURL.getPath()));
5959
if (ctx.updateExistingFiles || !Files.exists(targetFile)) {
6060
downloadFile(sourceURL, targetFile);
@@ -74,7 +74,7 @@ void downloadLangConfigurationJSONFile(final DownloadContext ctx, final String l
7474
if (isURL(langCfgPathOrURL)) {
7575
final var targetFile = ctx.targetDir.resolve(ctx.targetNamePrefix + ".language-configuration.json");
7676
if (ctx.updateExistingFiles || !Files.exists(targetFile)) {
77-
downloadFile(new URL(langCfgPathOrURL), targetFile);
77+
downloadFile(URI.create(langCfgPathOrURL).toURL(), targetFile);
7878
}
7979
} else {
8080
final var targetFile = ctx.targetDir.resolve(ctx.targetNamePrefix + ".language-configuration.json");
@@ -115,7 +115,7 @@ Path downloadTextMateGrammarFile(final DownloadContext ctx, final String grammar
115115
};
116116

117117
if (isURL(grammarPathOrURL)) {
118-
final var sourceURL = new URL(grammarPathOrURL);
118+
final var sourceURL = URI.create(grammarPathOrURL).toURL();
119119
final var targetFile = ctx.targetDir.resolve(ctx.targetNamePrefix + mapFileExt.apply(getFileExtension(sourceURL.getPath())
120120
.toLowerCase()));
121121
if (ctx.updateExistingFiles || !Files.exists(targetFile)) {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969

7070
<properties>
71-
<java.version>17</java.version>
71+
<java.version>21</java.version>
7272
<tycho.version>5.0.0</tycho.version>
7373

7474
<!-- to prevent dozen of warnings like:

0 commit comments

Comments
 (0)