diff --git a/config/checkstyle/checkstyle-suppressions.xml b/config/checkstyle/checkstyle-suppressions.xml
index 60923df61f7..1eebdbcdb78 100644
--- a/config/checkstyle/checkstyle-suppressions.xml
+++ b/config/checkstyle/checkstyle-suppressions.xml
@@ -29,6 +29,7 @@
+
diff --git a/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java b/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java
index fd04817c106..c8d11f22b80 100644
--- a/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java
+++ b/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java
@@ -442,7 +442,7 @@ public final class ConditionMessage {
return result;
}
- protected abstract @Nullable Object applyToItem(@Nullable Object item);
+ abstract @Nullable Object applyToItem(@Nullable Object item);
}
diff --git a/core/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiElement.java b/core/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiElement.java
index bd5e3b08b7a..fd6b9997045 100644
--- a/core/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiElement.java
+++ b/core/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiElement.java
@@ -25,6 +25,7 @@ package org.springframework.boot.ansi;
public interface AnsiElement {
/**
+ * Return the ANSI escape code.
* @return the ANSI escape code
*/
@Override
diff --git a/core/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiOutput.java b/core/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiOutput.java
index c0d9f272f0b..330e3c26b4d 100644
--- a/core/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiOutput.java
+++ b/core/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiOutput.java
@@ -65,7 +65,7 @@ public abstract class AnsiOutput {
}
/**
- * Returns if ANSI output is enabled
+ * Returns if ANSI output is enabled.
* @return if ANSI enabled, disabled or detected
*/
public static Enabled getEnabled() {
diff --git a/core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataProperties.java b/core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataProperties.java
index a9f74cdc47d..94c1b03ff51 100644
--- a/core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataProperties.java
+++ b/core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataProperties.java
@@ -52,7 +52,7 @@ class ConfigDataProperties {
* @param imports the imports requested
* @param activate the activate properties
*/
- ConfigDataProperties(@Nullable @Name("import") List imports, @Nullable Activate activate) {
+ ConfigDataProperties(@Name("import") @Nullable List imports, @Nullable Activate activate) {
this.imports = (imports != null) ? imports.stream().filter(ConfigDataLocation::isNotEmpty).toList()
: Collections.emptyList();
this.activate = activate;
diff --git a/core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/ColorConverter.java b/core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/ColorConverter.java
index ba2bc58b35b..a39244be1f6 100644
--- a/core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/ColorConverter.java
+++ b/core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/ColorConverter.java
@@ -125,7 +125,7 @@ public final class ColorConverter extends LogEventPatternConverter {
toAppendTo.append(AnsiOutput.toString(element, in));
}
- protected void appendAnsiString(StringBuilder toAppendTo, String in, AnsiElement... elements) {
+ void appendAnsiString(StringBuilder toAppendTo, String in, AnsiElement... elements) {
Object[] ansiParams = new Object[elements.length + 1];
System.arraycopy(elements, 0, ansiParams, 0, elements.length);
ansiParams[elements.length] = in;
diff --git a/core/spring-boot/src/main/java/org/springframework/boot/support/ReflectionEnvironmentPostProcessorsFactory.java b/core/spring-boot/src/main/java/org/springframework/boot/support/ReflectionEnvironmentPostProcessorsFactory.java
index 0f1055a14f4..4146a2abf23 100644
--- a/core/spring-boot/src/main/java/org/springframework/boot/support/ReflectionEnvironmentPostProcessorsFactory.java
+++ b/core/spring-boot/src/main/java/org/springframework/boot/support/ReflectionEnvironmentPostProcessorsFactory.java
@@ -43,7 +43,7 @@ class ReflectionEnvironmentPostProcessorsFactory implements EnvironmentPostProce
private @Nullable ClassLoader classLoader;
- private @Nullable final List classNames;
+ private final @Nullable List classNames;
ReflectionEnvironmentPostProcessorsFactory(Class>... classes) {
this.classes = new ArrayList<>(Arrays.asList(classes));
diff --git a/core/spring-boot/src/main/java/org/springframework/boot/support/SystemEnvironmentPropertySourceEnvironmentPostProcessor.java b/core/spring-boot/src/main/java/org/springframework/boot/support/SystemEnvironmentPropertySourceEnvironmentPostProcessor.java
index 2a2fb7b3354..90bbb55da10 100644
--- a/core/spring-boot/src/main/java/org/springframework/boot/support/SystemEnvironmentPropertySourceEnvironmentPostProcessor.java
+++ b/core/spring-boot/src/main/java/org/springframework/boot/support/SystemEnvironmentPropertySourceEnvironmentPostProcessor.java
@@ -88,7 +88,6 @@ public class SystemEnvironmentPropertySourceEnvironmentPostProcessor implements
* settings from a parent {@link ConfigurableEnvironment}.
* @param environment the environment to post-process
* @param parentEnvironment the parent environment
- * @since 3.4.12
*/
public static void postProcessEnvironment(ConfigurableEnvironment environment,
ConfigurableEnvironment parentEnvironment) {
diff --git a/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/JavaBeanBinderTests.java b/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/JavaBeanBinderTests.java
index eece843ebd7..fe298c08b4a 100644
--- a/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/JavaBeanBinderTests.java
+++ b/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/JavaBeanBinderTests.java
@@ -42,6 +42,7 @@ import org.springframework.boot.convert.Delimiter;
import org.springframework.core.ResolvableType;
import org.springframework.core.convert.ConversionService;
import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.format.annotation.DateTimeFormat.ISO;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@@ -1062,7 +1063,7 @@ class JavaBeanBinderTests {
static class ConverterAnnotatedExampleBean {
- @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
+ @DateTimeFormat(iso = ISO.DATE)
private @Nullable LocalDate date;
@Nullable LocalDate getDate() {
diff --git a/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/ValueObjectBinderTests.java b/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/ValueObjectBinderTests.java
index dc0a21acb60..5295b778571 100644
--- a/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/ValueObjectBinderTests.java
+++ b/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/ValueObjectBinderTests.java
@@ -38,6 +38,7 @@ import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.core.ResolvableType;
import org.springframework.core.convert.ConversionService;
import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.format.annotation.DateTimeFormat.ISO;
import org.springframework.util.Assert;
import static org.assertj.core.api.Assertions.assertThat;
@@ -697,8 +698,8 @@ class ValueObjectBinderTests {
private final String bar;
- ConverterAnnotatedExampleBean(
- @DefaultValue("2019-05-10") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, String bar) {
+ ConverterAnnotatedExampleBean(@DefaultValue("2019-05-10") @DateTimeFormat(iso = ISO.DATE) LocalDate date,
+ String bar) {
this.date = date;
this.bar = bar;
}
diff --git a/gradle.properties b/gradle.properties
index 80ae2cc3cba..f8fca625151 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -13,9 +13,15 @@ graalVersion=25
hamcrestVersion=3.0
jackson2Version=2.21.5
jacksonVersion=3.1.5
+<<<<<<< HEAD
javaFormatVersion=0.0.47
junitJupiterVersion=6.1.3
kotlinVersion=2.4.10
+=======
+javaFormatVersion=0.0.48
+junitJupiterVersion=6.0.3
+kotlinVersion=2.3.21
+>>>>>>> 4.1.x
mavenVersion=3.9.13
mockitoVersion=5.23.0
nativeBuildToolsVersion=1.1.8
diff --git a/module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/ShutdownEndpoint.java b/module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/ShutdownEndpoint.java
index 4c61cfcc088..2d7eeb297fb 100644
--- a/module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/ShutdownEndpoint.java
+++ b/module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/ShutdownEndpoint.java
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
@Endpoint(id = "shutdown", defaultAccess = Access.NONE)
public class ShutdownEndpoint implements ApplicationContextAware {
- @Nullable private ConfigurableApplicationContext context;
+ private @Nullable ConfigurableApplicationContext context;
@WriteOperation
public ShutdownDescriptor shutdown() {
diff --git a/module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/env/EnvironmentEndpoint.java b/module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/env/EnvironmentEndpoint.java
index 807ceb0761b..c4a0fdcc535 100644
--- a/module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/env/EnvironmentEndpoint.java
+++ b/module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/env/EnvironmentEndpoint.java
@@ -27,6 +27,7 @@ import java.util.regex.PatternSyntaxException;
import java.util.stream.Stream;
import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
import org.jspecify.annotations.Nullable;
import org.springframework.boot.actuate.endpoint.InvalidEndpointRequestException;
@@ -252,7 +253,7 @@ public class EnvironmentEndpoint {
/**
* Description of an entry of the {@link Environment}.
*/
- @JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonInclude(Include.NON_NULL)
public static final class EnvironmentEntryDescriptor {
private final @Nullable PropertySummaryDescriptor property;
@@ -292,7 +293,7 @@ public class EnvironmentEndpoint {
/**
* Description of a particular entry of the {@link Environment}.
*/
- @JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonInclude(Include.NON_NULL)
public static final class PropertySummaryDescriptor {
private final String source;
@@ -341,7 +342,7 @@ public class EnvironmentEndpoint {
/**
* Description of a particular entry of {@link PropertySource}.
*/
- @JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonInclude(Include.NON_NULL)
public static final class PropertySourceEntryDescriptor {
private final String name;
@@ -366,7 +367,7 @@ public class EnvironmentEndpoint {
/**
* Description of a property's value, including its origin if available.
*/
- @JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonInclude(Include.NON_NULL)
public static final class PropertyValueDescriptor {
private final @Nullable Object value;
diff --git a/module/spring-boot-amqp-rabbitmq/src/main/java/org/springframework/boot/amqp/rabbitmq/autoconfigure/RabbitAmqpListenerContainerFactoryConfigurer.java b/module/spring-boot-amqp-rabbitmq/src/main/java/org/springframework/boot/amqp/rabbitmq/autoconfigure/RabbitAmqpListenerContainerFactoryConfigurer.java
index deae4330a18..a3c6bffad6a 100644
--- a/module/spring-boot-amqp-rabbitmq/src/main/java/org/springframework/boot/amqp/rabbitmq/autoconfigure/RabbitAmqpListenerContainerFactoryConfigurer.java
+++ b/module/spring-boot-amqp-rabbitmq/src/main/java/org/springframework/boot/amqp/rabbitmq/autoconfigure/RabbitAmqpListenerContainerFactoryConfigurer.java
@@ -60,7 +60,7 @@ public final class RabbitAmqpListenerContainerFactoryConfigurer {
* converter should be used.
* @param messageConverter the {@link MessageConverter}
*/
- protected void setMessageConverter(@Nullable MessageConverter messageConverter) {
+ void setMessageConverter(@Nullable MessageConverter messageConverter) {
this.messageConverter = messageConverter;
}
@@ -68,7 +68,7 @@ public final class RabbitAmqpListenerContainerFactoryConfigurer {
* Set the {@link TaskScheduler} to use or {@code null} if the default should be used.
* @param taskScheduler the {@link TaskScheduler}
*/
- protected void setTaskScheduler(@Nullable TaskScheduler taskScheduler) {
+ void setTaskScheduler(@Nullable TaskScheduler taskScheduler) {
this.taskScheduler = taskScheduler;
}
diff --git a/module/spring-boot-devtools/src/intTest/java/org/springframework/boot/devtools/tests/AbstractDevToolsIntegrationTests.java b/module/spring-boot-devtools/src/intTest/java/org/springframework/boot/devtools/tests/AbstractDevToolsIntegrationTests.java
index 0a3f8607d18..d564a4816ab 100644
--- a/module/spring-boot-devtools/src/intTest/java/org/springframework/boot/devtools/tests/AbstractDevToolsIntegrationTests.java
+++ b/module/spring-boot-devtools/src/intTest/java/org/springframework/boot/devtools/tests/AbstractDevToolsIntegrationTests.java
@@ -101,12 +101,12 @@ abstract class AbstractDevToolsIntegrationTests {
this.classesDirectory = classesDirectory;
}
- protected ControllerBuilder withRequestMapping(String mapping) {
+ ControllerBuilder withRequestMapping(String mapping) {
this.mappings.add(mapping);
return this;
}
- protected void build() throws Exception {
+ void build() throws Exception {
DynamicType.Builder