Skip to content

Commit 2b69cff

Browse files
Update spring-javaformat to 0.0.39
Closes gh-2528
1 parent db7b19b commit 2b69cff

File tree

101 files changed

+767
-657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+767
-657
lines changed

buildSrc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ dependencies {
7272
implementation 'com.apollographql.apollo:apollo-runtime:2.4.5'
7373
implementation 'com.github.ben-manes:gradle-versions-plugin:0.38.0'
7474
implementation 'com.github.spullara.mustache.java:compiler:0.9.11'
75-
implementation 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.34'
75+
implementation 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.39'
7676
implementation 'io.spring.nohttp:nohttp-gradle:0.0.11'
7777
implementation 'net.sourceforge.htmlunit:htmlunit:2.37.0'
7878
implementation 'org.hidetake:gradle-ssh-plugin:2.10.1'

buildSrc/src/main/groovy/io/spring/gradle/convention/CheckstylePlugin.groovy

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package io.spring.gradle.convention
1818

1919
import org.gradle.api.Plugin
2020
import org.gradle.api.Project
21+
import org.gradle.api.artifacts.VersionCatalogsExtension
2122
import org.gradle.api.plugins.JavaPlugin
2223

2324
/**
@@ -31,12 +32,14 @@ class CheckstylePlugin implements Plugin<Project> {
3132

3233
@Override
3334
void apply(Project project) {
35+
def versionCatalog = project.rootProject.extensions.getByType(VersionCatalogsExtension.class)
36+
.named("libs")
3437
project.plugins.withType(JavaPlugin) {
3538
def checkstyleDir = project.rootProject.file(CHECKSTYLE_DIR)
3639
if (checkstyleDir.exists() && checkstyleDir.directory) {
3740
project.getPluginManager().apply('checkstyle')
38-
project.dependencies.add('checkstyle', 'io.spring.javaformat:spring-javaformat-checkstyle:0.0.29')
39-
project.dependencies.add('checkstyle', 'io.spring.nohttp:nohttp-checkstyle:0.0.3.RELEASE')
41+
project.dependencies.add('checkstyle', versionCatalog.findLibrary('io-spring-javaformat-spring-javaformat-checkstyle').get())
42+
project.dependencies.add('checkstyle', versionCatalog.findLibrary('io-spring-nohttp-nohttp-checkstyle').get())
4043

4144
project.checkstyle {
4245
configDirectory = checkstyleDir

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ com-zaxxer-HikariCP = "com.zaxxer:HikariCP:5.0.1"
3030
edu-umd-cs-mtc-multithreadedtc = "edu.umd.cs.mtc:multithreadedtc:1.01"
3131
io-lettuce-lettuce-core = "io.lettuce:lettuce-core:6.2.6.RELEASE"
3232
io-projectreactor-reactor-bom = { module = "io.projectreactor:reactor-bom", version = "2022.0.12" }
33-
io-spring-javaformat-spring-javaformat-checkstyle = "io.spring.javaformat:spring-javaformat-checkstyle:0.0.29"
33+
io-spring-javaformat-spring-javaformat-checkstyle = "io.spring.javaformat:spring-javaformat-checkstyle:0.0.39"
3434
io-spring-nohttp-nohttp-checkstyle = "io.spring.nohttp:nohttp-checkstyle:0.0.11"
3535
jakarta-servlet-jakarta-servlet-api = "jakarta.servlet:jakarta.servlet-api:6.0.0"
3636
jakarta-servlet-jsp-jstl-jakarta-servlet-jsp-jstl-api = "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0"

spring-session-core/src/main/java/org/springframework/session/FindByIndexNameSessionRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public interface FindByIndexNameSessionRepository<S extends Session> extends Ses
3838
* @since 1.1
3939
*/
4040
String PRINCIPAL_NAME_INDEX_NAME = FindByIndexNameSessionRepository.class.getName()
41-
.concat(".PRINCIPAL_NAME_INDEX_NAME");
41+
.concat(".PRINCIPAL_NAME_INDEX_NAME");
4242

4343
/**
4444
* Find a {@link Map} of the session id to the {@link Session} of all sessions that

spring-session-core/src/main/java/org/springframework/session/MapSession.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public final class MapSession implements Session, Serializable {
5757
* Default {@link #setMaxInactiveInterval(Duration)} (30 minutes).
5858
*/
5959
public static final Duration DEFAULT_MAX_INACTIVE_INTERVAL = Duration
60-
.ofSeconds(DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS);
60+
.ofSeconds(DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS);
6161

6262
private String id;
6363

spring-session-core/src/main/java/org/springframework/session/aot/hint/CommonSessionRuntimeHints.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ class CommonSessionRuntimeHints implements RuntimeHintsRegistrar {
3333

3434
@Override
3535
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
36-
Arrays.asList(TypeReference.of(String.class), TypeReference.of(ArrayList.class),
37-
TypeReference.of(TreeSet.class), TypeReference.of(Number.class), TypeReference.of(Long.class),
38-
TypeReference.of(Integer.class), TypeReference.of(StackTraceElement.class),
39-
TypeReference.of(Throwable.class), TypeReference.of(Exception.class),
40-
TypeReference.of(RuntimeException.class),
41-
TypeReference.of("java.util.Collections$UnmodifiableCollection"),
42-
TypeReference.of("java.util.Collections$UnmodifiableList"),
43-
TypeReference.of("java.util.Collections$EmptyList"),
44-
TypeReference.of("java.util.Collections$UnmodifiableRandomAccessList"),
45-
TypeReference.of("java.util.Collections$UnmodifiableSet")).forEach(hints.serialization()::registerType);
36+
Arrays
37+
.asList(TypeReference.of(String.class), TypeReference.of(ArrayList.class), TypeReference.of(TreeSet.class),
38+
TypeReference.of(Number.class), TypeReference.of(Long.class), TypeReference.of(Integer.class),
39+
TypeReference.of(StackTraceElement.class), TypeReference.of(Throwable.class),
40+
TypeReference.of(Exception.class), TypeReference.of(RuntimeException.class),
41+
TypeReference.of("java.util.Collections$UnmodifiableCollection"),
42+
TypeReference.of("java.util.Collections$UnmodifiableList"),
43+
TypeReference.of("java.util.Collections$EmptyList"),
44+
TypeReference.of("java.util.Collections$UnmodifiableRandomAccessList"),
45+
TypeReference.of("java.util.Collections$UnmodifiableSet"))
46+
.forEach(hints.serialization()::registerType);
4647
}
4748

4849
}

spring-session-core/src/main/java/org/springframework/session/aot/hint/CommonSessionSecurityRuntimeHints.java

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,34 +53,37 @@ private void registerSecurityHintsIfNeeded(RuntimeHints hints) {
5353
TypeReference.of("org.springframework.security.authentication.CredentialsExpiredException"),
5454
TypeReference.of("org.springframework.security.authentication.InsufficientAuthenticationException"),
5555
TypeReference
56-
.of("org.springframework.security.web.authentication.session.SessionAuthenticationException"),
57-
TypeReference.of(
58-
"org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationException"),
56+
.of("org.springframework.security.web.authentication.session.SessionAuthenticationException"),
57+
TypeReference
58+
.of("org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationException"),
5959
TypeReference.of("org.springframework.security.core.userdetails.User$AuthorityComparator"))
60-
.forEach((type) -> hints.serialization().registerType(type, (hint) -> hint.onReachableType(
60+
.forEach((type) -> hints.serialization()
61+
.registerType(type, (hint) -> hint.onReachableType(
6162
TypeReference.of("org.springframework.security.core.context.SecurityContextImpl"))));
6263
}
6364

6465
private void registerOAuth2ResourceServerHintsIfNeeded(RuntimeHints hints) {
6566
Arrays.asList(
6667
TypeReference.of("org.springframework.security.oauth2.server.resource.BearerTokenAuthenticationToken"),
67-
TypeReference.of(
68-
"org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken"),
68+
TypeReference
69+
.of("org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken"),
6970
TypeReference.of("org.springframework.security.oauth2.core.OAuth2AuthenticationException"))
70-
.forEach((type) -> hints.serialization().registerType(type, (hint) -> hint.onReachableType(TypeReference
71-
.of("org.springframework.security.oauth2.server.resource.BearerTokenAuthenticationToken"))));
71+
.forEach((type) -> hints.serialization()
72+
.registerType(type, (hint) -> hint.onReachableType(TypeReference
73+
.of("org.springframework.security.oauth2.server.resource.BearerTokenAuthenticationToken"))));
7274
}
7375

7476
private void registerOAuth2ClientHintsIfNeeded(RuntimeHints hints) {
7577
Arrays.asList(
7678
TypeReference.of("org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken"),
7779
TypeReference
78-
.of("org.springframework.security.oauth2.client.authentication.OAuth2LoginAuthenticationToken"),
79-
TypeReference.of(
80-
"org.springframework.security.oauth2.client.authentication.OAuth2AuthorizationCodeAuthenticationToken"),
80+
.of("org.springframework.security.oauth2.client.authentication.OAuth2LoginAuthenticationToken"),
81+
TypeReference
82+
.of("org.springframework.security.oauth2.client.authentication.OAuth2AuthorizationCodeAuthenticationToken"),
8183
TypeReference.of("org.springframework.security.oauth2.core.OAuth2AuthenticationException"))
82-
.forEach((type) -> hints.serialization().registerType(type, (hint) -> hint.onReachableType(TypeReference
83-
.of("org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken"))));
84+
.forEach((type) -> hints.serialization()
85+
.registerType(type, (hint) -> hint.onReachableType(TypeReference
86+
.of("org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken"))));
8487
}
8588

8689
}

spring-session-core/src/main/java/org/springframework/session/aot/hint/server/WebSessionSecurityRuntimeHints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class WebSessionSecurityRuntimeHints implements RuntimeHintsRegistrar {
3131
@Override
3232
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
3333
if (!ClassUtils.isPresent("org.springframework.web.server.WebSession", classLoader) || !ClassUtils
34-
.isPresent("org.springframework.security.web.server.csrf.DefaultCsrfToken", classLoader)) {
34+
.isPresent("org.springframework.security.web.server.csrf.DefaultCsrfToken", classLoader)) {
3535
return;
3636
}
3737
hints.serialization().registerType(DefaultCsrfToken.class);

spring-session-core/src/main/java/org/springframework/session/aot/hint/servlet/HttpSessionSecurityRuntimeHints.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
4242
|| !ClassUtils.isPresent("org.springframework.security.web.csrf.DefaultCsrfToken", classLoader)) {
4343
return;
4444
}
45-
Arrays.asList(TypeReference.of(TreeMap.class), TypeReference.of(Locale.class),
46-
TypeReference.of(DefaultSavedRequest.class), TypeReference.of(DefaultCsrfToken.class),
47-
TypeReference.of(WebAuthenticationDetails.class), TypeReference.of(SavedCookie.class),
48-
TypeReference.of("java.lang.String$CaseInsensitiveComparator"))
49-
.forEach(hints.serialization()::registerType);
45+
Arrays
46+
.asList(TypeReference.of(TreeMap.class), TypeReference.of(Locale.class),
47+
TypeReference.of(DefaultSavedRequest.class), TypeReference.of(DefaultCsrfToken.class),
48+
TypeReference.of(WebAuthenticationDetails.class), TypeReference.of(SavedCookie.class),
49+
TypeReference.of("java.lang.String$CaseInsensitiveComparator"))
50+
.forEach(hints.serialization()::registerType);
5051
}
5152

5253
}

spring-session-core/src/main/java/org/springframework/session/config/annotation/web/http/SpringHttpSessionConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public <S extends Session> SessionRepositoryFilter<? extends Session> springSess
131131
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
132132
if (ClassUtils.isPresent("org.springframework.security.web.authentication.RememberMeServices", null)) {
133133
this.usesSpringSessionRememberMeServices = !ObjectUtils
134-
.isEmpty(applicationContext.getBeanNamesForType(SpringSessionRememberMeServices.class));
134+
.isEmpty(applicationContext.getBeanNamesForType(SpringSessionRememberMeServices.class));
135135
}
136136
}
137137

0 commit comments

Comments
 (0)