Skip to content

Commit 9a3a443

Browse files
committed
Update supported JDK version from 11 to 17
Closes gh-398
1 parent f4ac97d commit 9a3a443

File tree

29 files changed

+65
-65
lines changed

29 files changed

+65
-65
lines changed

CONTRIBUTING.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ should also work without issue.
2929

3030

3131
=== Building From Source
32-
To build the source you will need to install JDK 11.
32+
To build the source you will need to install JDK 17.
3333

3434

3535

@@ -206,9 +206,9 @@ Under `spring-javaformat` the following projects are defined:
206206
* `spring-javaformat-formatter-shader` - Shader support classes
207207
* `spring-javaformat-formatter-shaded` - A shaded version of the formatter with all dependencies included
208208
* `spring-javaformat-formatter-eclipse-jdk8` - The eclipse JDK 8 formatter (repackaged and slightly adapted)
209-
* `spring-javaformat-formatter-eclipse-jdk11` - The eclipse JDK 11 formatter (repackaged and slightly adapted)
209+
* `spring-javaformat-formatter-eclipse-jdk17` - The eclipse JDK 17 formatter (repackaged and slightly adapted)
210210
* `spring-javaformat-formatter-eclipse-jdt-jdk8` - The eclipse JDT import for JDK 8
211-
* `spring-javaformat-formatter-eclipse-jdt-jdk11` - The eclipse JDT import for JDK 8
211+
* `spring-javaformat-formatter-eclipse-jdt-jdk17` - The eclipse JDT import for JDK 17
212212
* `spring-javaformat-formatter-eclipse-rewriter` - Internal utility used to modify eclipse code
213213
* `spring-javaformat-formatter-eclipse-runtime` - Eclipse runtime JAR for use when running outside of Eclipse
214214

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Your `checkstyle.xml` file should look then like this:
192192

193193

194194
=== Java 8 Support
195-
By default, the formatter requires Java 11.
195+
By default, the formatter requires Java 17.
196196
If you are working on an older project, you can use a variation of the formatter based off Eclipse 2021-03 (the latest Eclipse JDT version built with Java 8).
197197

198198
To use the Java 8 version, add a file called `.springjavaformatconfig` to the root of your project with the following content:

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3333
<java.version>1.8</java.version>
3434
<eclipse.jdk8.repository>https://download.eclipse.org/releases/2021-03/202103171000/</eclipse.jdk8.repository>
35-
<eclipse.jdk11.repository>https://download.eclipse.org/releases/2022-12/202212071000/</eclipse.jdk11.repository>
35+
<eclipse.jdk17.repository>https://download.eclipse.org/releases/2022-12/202212071000/</eclipse.jdk17.repository>
3636
<eclipse.checkstyle.repository>https://checkstyle.org/eclipse-cs-update-site/</eclipse.checkstyle.repository>
3737
<tycho.disableP2Mirrors>true</tycho.disableP2Mirrors>
3838
<ant.version>1.8.1</ant.version>

spring-javaformat-eclipse/io.spring.javaformat.eclipse.tests/src/io/spring/javaformat/eclipse/projectsettings/ProjectSettingsFilesLocatorTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2023 the original author or authors.
2+
* Copyright 2017-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ void jdtCorePrefsFormatterWhenDefaultUsesTabs() throws IOException {
8484
Properties properties = new Properties();
8585
properties.load(content);
8686
assertThat(properties.get("org.eclipse.jdt.core.javaFormatter"))
87-
.isEqualTo("io.spring.javaformat.eclipse.formatter.jdk11.tabs");
87+
.isEqualTo("io.spring.javaformat.eclipse.formatter.jdk17.tabs");
8888
}
8989
}
9090

spring-javaformat-eclipse/io.spring.javaformat.eclipse/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ Bundle-ClassPath: .,
2121
lib/spring-javaformat-config.jar,
2222
lib/spring-javaformat-formatter.jar,
2323
lib/spring-javaformat-checkstyle.jar,
24-
lib/spring-javaformat-formatter-eclipse-jdt-jdk11.jar,
24+
lib/spring-javaformat-formatter-eclipse-jdt-jdk17.jar,
2525
lib/spring-javaformat-formatter-eclipse-jdt-jdk8.jar
2626
Bundle-ActivationPolicy: lazy

spring-javaformat-eclipse/io.spring.javaformat.eclipse/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ bin.includes = META-INF/,\
66
lib/spring-javaformat-checkstyle.jar,\
77
lib/spring-javaformat-config.jar,\
88
lib/spring-javaformat-formatter.jar,\
9-
lib/spring-javaformat-formatter-eclipse-jdt-jdk11.jar,\
9+
lib/spring-javaformat-formatter-eclipse-jdt-jdk17.jar,\
1010
lib/spring-javaformat-formatter-eclipse-jdt-jdk8.jar

spring-javaformat-eclipse/io.spring.javaformat.eclipse/plugin.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<plugin>
44
<extension point="org.eclipse.jdt.core.javaFormatter">
55
<javaFormatter
6-
class="io.spring.javaformat.eclipse.formatter.SpringCodeFormatterJdk11Tabs"
7-
id="io.spring.javaformat.eclipse.formatter.jdk11.tabs"
6+
class="io.spring.javaformat.eclipse.formatter.SpringCodeFormatterJdk17Tabs"
7+
id="io.spring.javaformat.eclipse.formatter.jdk17.tabs"
88
name="Spring (tabs)">
99
</javaFormatter>
1010
<javaFormatter
11-
class="io.spring.javaformat.eclipse.formatter.SpringCodeFormatterJdk11Spaces"
12-
id="io.spring.javaformat.eclipse.formatter.jdk11.spaces"
11+
class="io.spring.javaformat.eclipse.formatter.SpringCodeFormatterJdk17Spaces"
12+
id="io.spring.javaformat.eclipse.formatter.jdk17.spaces"
1313
name="Spring (spaces)">
1414
</javaFormatter>
1515
<javaFormatter

spring-javaformat-eclipse/io.spring.javaformat.eclipse/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</additionalDependency>
6161
<additionalDependency>
6262
<groupId>io.spring.javaformat</groupId>
63-
<artifactId>spring-javaformat-formatter-eclipse-jdt-jdk11</artifactId>
63+
<artifactId>spring-javaformat-formatter-eclipse-jdt-jdk17</artifactId>
6464
<version>${project.version}</version>
6565
</additionalDependency>
6666
</additionalDependencies>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2021 the original author or authors.
2+
* Copyright 2017-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,10 +27,10 @@
2727
*
2828
* @author Phillip Webb
2929
*/
30-
public class SpringCodeFormatterJdk11Spaces extends SpringCodeFormatter {
30+
public class SpringCodeFormatterJdk17Spaces extends SpringCodeFormatter {
3131

32-
public SpringCodeFormatterJdk11Spaces() {
33-
super(JavaFormatConfig.of(JavaBaseline.V11, IndentationStyle.SPACES));
32+
public SpringCodeFormatterJdk17Spaces() {
33+
super(JavaFormatConfig.of(JavaBaseline.V17, IndentationStyle.SPACES));
3434
}
3535

3636
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2021 the original author or authors.
2+
* Copyright 2017-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,10 +27,10 @@
2727
*
2828
* @author Phillip Webb
2929
*/
30-
public class SpringCodeFormatterJdk11Tabs extends SpringCodeFormatter {
30+
public class SpringCodeFormatterJdk17Tabs extends SpringCodeFormatter {
3131

32-
public SpringCodeFormatterJdk11Tabs() {
33-
super(JavaFormatConfig.of(JavaBaseline.V11, IndentationStyle.TABS));
32+
public SpringCodeFormatterJdk17Tabs() {
33+
super(JavaFormatConfig.of(JavaBaseline.V17, IndentationStyle.TABS));
3434
}
3535

3636
}

0 commit comments

Comments
 (0)