diff --git a/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/PluginClasspathGradleBuild.java b/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/PluginClasspathGradleBuild.java index 0dd30256b8c..b064ba83f0e 100644 --- a/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/PluginClasspathGradleBuild.java +++ b/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/PluginClasspathGradleBuild.java @@ -56,7 +56,7 @@ import org.springframework.boot.testsupport.gradle.testkit.GradleBuild; */ public class PluginClasspathGradleBuild extends GradleBuild { - private boolean kotlin = false; + private boolean kotlin; public PluginClasspathGradleBuild(BuildOutput buildOutput) { super(buildOutput); diff --git a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java index cb6b81b348f..39e06f2989f 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java @@ -142,7 +142,7 @@ class PluginXmlParser { return new Iterator<>() { - private int index = 0; + private int index; @Override public boolean hasNext() { diff --git a/buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/socket/FileDescriptorTests.java b/buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/socket/FileDescriptorTests.java index 6f849a2c3f0..748551ea20a 100644 --- a/buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/socket/FileDescriptorTests.java +++ b/buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/socket/FileDescriptorTests.java @@ -31,7 +31,7 @@ class FileDescriptorTests { private final int sourceHandle = 123; - private int closedHandle = 0; + private int closedHandle; @Test void acquireReturnsHandle() throws Exception { diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 1d71812a2d3..803d009e6ce 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -16,6 +16,7 @@ + diff --git a/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java b/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java index 1bf0f27275b..b30daea1f41 100644 --- a/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java +++ b/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java @@ -76,13 +76,13 @@ public class MessageSourceProperties { * Whether to always apply the MessageFormat rules, parsing even messages without * arguments. */ - private boolean alwaysUseMessageFormat = false; + private boolean alwaysUseMessageFormat; /** * Whether to use the message code as the default message instead of throwing a * "NoSuchMessageException". Recommended during development only. */ - private boolean useCodeAsDefaultMessage = false; + private boolean useCodeAsDefaultMessage; public List getBasename() { return this.basename; diff --git a/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxProperties.java b/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxProperties.java index 973823b32cf..8058c7e7cc7 100644 --- a/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxProperties.java +++ b/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxProperties.java @@ -33,12 +33,12 @@ public class JmxProperties { /** * Expose Spring's management beans to the JMX domain. */ - private boolean enabled = false; + private boolean enabled; /** * Whether unique runtime object names should be ensured. */ - private boolean uniqueNames = false; + private boolean uniqueNames; /** * MBeanServer bean name. diff --git a/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebProperties.java b/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebProperties.java index 10ef79649f7..33a0a14553e 100644 --- a/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebProperties.java +++ b/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebProperties.java @@ -101,7 +101,7 @@ public class WebProperties { */ private boolean addMappings = true; - private boolean customized = false; + private boolean customized; private final Chain chain = new Chain(); @@ -151,7 +151,7 @@ public class WebProperties { */ public static class Chain { - boolean customized = false; + boolean customized; /** * Whether to enable the Spring Resource Handling chain. By default, disabled @@ -169,7 +169,7 @@ public class WebProperties { * brotli). Checks for a resource name with the '.gz' or '.br' file * extensions. */ - private boolean compressed = false; + private boolean compressed; private final Strategy strategy = new Strategy(); @@ -246,7 +246,7 @@ public class WebProperties { */ public static class Content { - private boolean customized = false; + private boolean customized; /** * Whether to enable the content Version Strategy. @@ -287,7 +287,7 @@ public class WebProperties { */ public static class Fixed { - private boolean customized = false; + private boolean customized; /** * Whether to enable the fixed Version Strategy. @@ -346,7 +346,7 @@ public class WebProperties { */ public static class Cache { - private boolean customized = false; + private boolean customized; /** * Cache period for the resources served by the resource handler. If a @@ -398,7 +398,7 @@ public class WebProperties { */ public static class Cachecontrol { - private boolean customized = false; + private boolean customized; /** * Maximum time the response should be cached, in seconds if no duration diff --git a/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java b/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java index c5ced769702..f832726a6de 100644 --- a/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java +++ b/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java @@ -130,7 +130,7 @@ class JmxAutoConfigurationTests { @ManagedResource public static class Counter { - private int counter = 0; + private int counter; @ManagedAttribute public int get() { diff --git a/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ssl/FileWatcherTests.java b/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ssl/FileWatcherTests.java index 17c93461b4a..8802c9a369c 100644 --- a/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ssl/FileWatcherTests.java +++ b/core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ssl/FileWatcherTests.java @@ -336,7 +336,7 @@ class FileWatcherTests { private CountDownLatch latch = new CountDownLatch(1); - volatile boolean changed = false; + volatile boolean changed; @Override public void run() { diff --git a/core/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWebEnvironmentMockTests.java b/core/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWebEnvironmentMockTests.java index 36a4102cc84..41c20004682 100644 --- a/core/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWebEnvironmentMockTests.java +++ b/core/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWebEnvironmentMockTests.java @@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat; class SpringBootTestWebEnvironmentMockTests { @Value("${value}") - private int value = 0; + private int value; @Autowired private WebApplicationContext context; diff --git a/core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/ImportTestcontainersTests.java b/core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/ImportTestcontainersTests.java index 997cbb96740..ccdfae3c019 100644 --- a/core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/ImportTestcontainersTests.java +++ b/core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/ImportTestcontainersTests.java @@ -144,7 +144,7 @@ class ImportTestcontainersTests { @ImportTestcontainers static class NullContainer { - static @Nullable PostgreSQLContainer container = null; + static @Nullable PostgreSQLContainer container; } diff --git a/core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationShutdownHook.java b/core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationShutdownHook.java index b845dd74367..d0671b77f90 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationShutdownHook.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationShutdownHook.java @@ -63,7 +63,7 @@ class SpringApplicationShutdownHook implements Runnable { private final AtomicBoolean shutdownHookAdded = new AtomicBoolean(); - private volatile boolean shutdownHookAdditionEnabled = false; + private volatile boolean shutdownHookAdditionEnabled; private boolean inProgress; diff --git a/core/spring-boot/src/main/java/org/springframework/boot/SpringBootExceptionHandler.java b/core/spring-boot/src/main/java/org/springframework/boot/SpringBootExceptionHandler.java index 06e579ad269..b29ed796ab5 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/SpringBootExceptionHandler.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/SpringBootExceptionHandler.java @@ -48,7 +48,7 @@ class SpringBootExceptionHandler implements UncaughtExceptionHandler { private final List loggedExceptions = new ArrayList<>(); - private int exitCode = 0; + private int exitCode; SpringBootExceptionHandler(@Nullable UncaughtExceptionHandler parent) { this.parent = parent; diff --git a/core/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java b/core/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java index bd473673a6d..d5b60317135 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java @@ -193,7 +193,7 @@ public class LoggingApplicationListener implements GenericApplicationListener { private boolean parseArgs = true; - private @Nullable LogLevel springBootLogging = null; + private @Nullable LogLevel springBootLogging; @Override public boolean supportsEventType(ResolvableType resolvableType) { diff --git a/core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySource.java b/core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySource.java index 1ef6f7e88c1..2a638d5e2ae 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySource.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySource.java @@ -373,7 +373,7 @@ class SpringIterableConfigurationPropertySource extends SpringConfigurationPrope private final @Nullable ConfigurationPropertyName[] names; - private int index = 0; + private int index; ConfigurationPropertyNamesIterator(@Nullable ConfigurationPropertyName[] names) { this.names = names; diff --git a/core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/TestLog4J2LoggingSystem.java b/core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/TestLog4J2LoggingSystem.java index 1f3a5598d3b..ca937aa5879 100644 --- a/core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/TestLog4J2LoggingSystem.java +++ b/core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/TestLog4J2LoggingSystem.java @@ -22,7 +22,7 @@ import org.jspecify.annotations.Nullable; class TestLog4J2LoggingSystem extends Log4J2LoggingSystem { - private boolean disableSelfInitialization = false; + private boolean disableSelfInitialization; TestLog4J2LoggingSystem(String contextName) { // Tests add resources to the thread context classloader diff --git a/integration-test/spring-boot-test-integration-tests/src/test/java/org/springframework/boot/web/server/test/AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests.java b/integration-test/spring-boot-test-integration-tests/src/test/java/org/springframework/boot/web/server/test/AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests.java index 303a01e49d6..26579c92d71 100644 --- a/integration-test/spring-boot-test-integration-tests/src/test/java/org/springframework/boot/web/server/test/AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests.java +++ b/integration-test/spring-boot-test-integration-tests/src/test/java/org/springframework/boot/web/server/test/AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests.java @@ -53,10 +53,10 @@ import static org.assertj.core.api.Assertions.assertThat; abstract class AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests { @LocalServerPort - private int port = 0; + private int port; @Value("${value}") - private int value = 0; + private int value; @Autowired private ReactiveWebApplicationContext context; diff --git a/integration-test/spring-boot-test-integration-tests/src/test/java/org/springframework/boot/web/server/test/AbstractSpringBootTestWebServerWebEnvironmentTests.java b/integration-test/spring-boot-test-integration-tests/src/test/java/org/springframework/boot/web/server/test/AbstractSpringBootTestWebServerWebEnvironmentTests.java index 8458156c003..64dc82360c4 100644 --- a/integration-test/spring-boot-test-integration-tests/src/test/java/org/springframework/boot/web/server/test/AbstractSpringBootTestWebServerWebEnvironmentTests.java +++ b/integration-test/spring-boot-test-integration-tests/src/test/java/org/springframework/boot/web/server/test/AbstractSpringBootTestWebServerWebEnvironmentTests.java @@ -54,10 +54,10 @@ import static org.assertj.core.api.Assertions.assertThat; abstract class AbstractSpringBootTestWebServerWebEnvironmentTests { @LocalServerPort - private int port = 0; + private int port; @Value("${value}") - private int value = 0; + private int value; @Autowired private WebApplicationContext context; diff --git a/loader/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java b/loader/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java index 32b1e873481..cab9361720a 100644 --- a/loader/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java +++ b/loader/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java @@ -295,7 +295,7 @@ public abstract class MainClassFinder { private boolean mainMethodFound; - private boolean java25OrLater = false; + private boolean java25OrLater; ClassDescriptor() { super(SpringAsmInfo.ASM_VERSION); diff --git a/loader/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SizeCalculatingEntryWriter.java b/loader/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SizeCalculatingEntryWriter.java index 8606dd6071e..5adda13b3e5 100644 --- a/loader/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SizeCalculatingEntryWriter.java +++ b/loader/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SizeCalculatingEntryWriter.java @@ -89,7 +89,7 @@ final class SizeCalculatingEntryWriter implements EntryWriter { */ private static class SizeCalculatingOutputStream extends OutputStream { - private int size = 0; + private int size; private @Nullable File tempFile; diff --git a/loader/spring-boot-loader/src/main/java/org/springframework/boot/loader/zip/VirtualDataBlock.java b/loader/spring-boot-loader/src/main/java/org/springframework/boot/loader/zip/VirtualDataBlock.java index 7a8f6caa934..18527ca33e8 100644 --- a/loader/spring-boot-loader/src/main/java/org/springframework/boot/loader/zip/VirtualDataBlock.java +++ b/loader/spring-boot-loader/src/main/java/org/springframework/boot/loader/zip/VirtualDataBlock.java @@ -34,7 +34,7 @@ class VirtualDataBlock implements DataBlock { private long size; - private volatile int lastReadPart = 0; + private volatile int lastReadPart; /** * Create a new {@link VirtualDataBlock} instance. The {@link #setParts(Collection)} diff --git a/module/spring-boot-activemq/src/main/java/org/springframework/boot/activemq/autoconfigure/ActiveMQProperties.java b/module/spring-boot-activemq/src/main/java/org/springframework/boot/activemq/autoconfigure/ActiveMQProperties.java index 74b67fe77af..f7ea9f5f33d 100644 --- a/module/spring-boot-activemq/src/main/java/org/springframework/boot/activemq/autoconfigure/ActiveMQProperties.java +++ b/module/spring-boot-activemq/src/main/java/org/springframework/boot/activemq/autoconfigure/ActiveMQProperties.java @@ -69,7 +69,7 @@ public class ActiveMQProperties { * Whether to stop message delivery before re-delivering messages from a rolled back * transaction. This implies that message order is not preserved when this is enabled. */ - private boolean nonBlockingRedelivery = false; + private boolean nonBlockingRedelivery; /** * Time to wait on message sends for a response. Set it to 0 to wait forever. diff --git a/module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpointTests.java b/module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpointTests.java index 0820b626b75..a63d06415a4 100644 --- a/module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpointTests.java +++ b/module/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpointTests.java @@ -477,7 +477,7 @@ class ConfigurationPropertiesReportEndpointTests { private String myTestProperty = "654321"; - private @Nullable String nullValue = null; + private @Nullable String nullValue; private Duration duration = Duration.ofSeconds(10); diff --git a/module/spring-boot-amqp/src/main/java/org/springframework/boot/amqp/autoconfigure/RabbitProperties.java b/module/spring-boot-amqp/src/main/java/org/springframework/boot/amqp/autoconfigure/RabbitProperties.java index 6dc6f98c7d0..419b6da1c6a 100644 --- a/module/spring-boot-amqp/src/main/java/org/springframework/boot/amqp/autoconfigure/RabbitProperties.java +++ b/module/spring-boot-amqp/src/main/java/org/springframework/boot/amqp/autoconfigure/RabbitProperties.java @@ -940,7 +940,7 @@ public class RabbitProperties { * Whether to fail if the queues declared by the container are not available on * the broker. */ - private boolean missingQueuesFatal = false; + private boolean missingQueuesFatal; public @Nullable Integer getConsumersPerQueue() { return this.consumersPerQueue; diff --git a/module/spring-boot-batch-jdbc/src/test/java/org/springframework/boot/batch/jdbc/autoconfigure/BatchJdbcAutoConfigurationTests.java b/module/spring-boot-batch-jdbc/src/test/java/org/springframework/boot/batch/jdbc/autoconfigure/BatchJdbcAutoConfigurationTests.java index 0f3e70f3d23..479006a12ed 100644 --- a/module/spring-boot-batch-jdbc/src/test/java/org/springframework/boot/batch/jdbc/autoconfigure/BatchJdbcAutoConfigurationTests.java +++ b/module/spring-boot-batch-jdbc/src/test/java/org/springframework/boot/batch/jdbc/autoconfigure/BatchJdbcAutoConfigurationTests.java @@ -637,7 +637,7 @@ class BatchJdbcAutoConfigurationTests { Job discreteJob() { AbstractJob job = new AbstractJob("discreteRegisteredJob") { - private static int count = 0; + private static int count; @Override public Collection getStepNames() { diff --git a/module/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchJobLauncherAutoConfigurationTests.java b/module/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchJobLauncherAutoConfigurationTests.java index e653456d515..6ca6b456bd6 100644 --- a/module/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchJobLauncherAutoConfigurationTests.java +++ b/module/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchJobLauncherAutoConfigurationTests.java @@ -142,7 +142,7 @@ class BatchJobLauncherAutoConfigurationTests { Job discreteJob() { AbstractJob job = new AbstractJob("discreteRegisteredJob") { - private static int count = 0; + private static int count; @Override public Collection getStepNames() { diff --git a/module/spring-boot-data-commons/src/main/java/org/springframework/boot/data/autoconfigure/web/DataWebProperties.java b/module/spring-boot-data-commons/src/main/java/org/springframework/boot/data/autoconfigure/web/DataWebProperties.java index e3f276bd529..9edd09857b6 100644 --- a/module/spring-boot-data-commons/src/main/java/org/springframework/boot/data/autoconfigure/web/DataWebProperties.java +++ b/module/spring-boot-data-commons/src/main/java/org/springframework/boot/data/autoconfigure/web/DataWebProperties.java @@ -60,7 +60,7 @@ public class DataWebProperties { * Whether to expose and assume 1-based page number indexes. Defaults to "false", * meaning a page number of 0 in the request equals the first page. */ - private boolean oneIndexedParameters = false; + private boolean oneIndexedParameters; /** * General prefix to be prepended to the page number and page size parameters. diff --git a/module/spring-boot-data-redis/src/main/java/org/springframework/boot/data/redis/autoconfigure/DataRedisProperties.java b/module/spring-boot-data-redis/src/main/java/org/springframework/boot/data/redis/autoconfigure/DataRedisProperties.java index 66152a41c22..e3dfb396586 100644 --- a/module/spring-boot-data-redis/src/main/java/org/springframework/boot/data/redis/autoconfigure/DataRedisProperties.java +++ b/module/spring-boot-data-redis/src/main/java/org/springframework/boot/data/redis/autoconfigure/DataRedisProperties.java @@ -42,7 +42,7 @@ public class DataRedisProperties { /** * Database index used by the connection factory. */ - private int database = 0; + private int database; /** * Connection URL. Overrides host, port, username, password, and database. Example: @@ -258,7 +258,7 @@ public class DataRedisProperties { * setting only has an effect if both it and time between eviction runs are * positive. */ - private int minIdle = 0; + private int minIdle; /** * Maximum number of connections that can be allocated by the pool at a given diff --git a/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsProperties.java b/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsProperties.java index 986dcd2367d..b7ecb9ebb6b 100644 --- a/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsProperties.java +++ b/module/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsProperties.java @@ -193,7 +193,7 @@ public class DevToolsProperties { /** * Whether to enable a livereload.com-compatible server. */ - private boolean enabled = false; + private boolean enabled; /** * Server port. diff --git a/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java b/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java index 82be46f6442..9d019e0c642 100644 --- a/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java +++ b/module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java @@ -205,7 +205,7 @@ class RestarterTests { @EnableScheduling static class SampleApplication { - private int count = 0; + private int count; private static final AtomicBoolean restart = new AtomicBoolean(); @@ -233,7 +233,7 @@ class RestarterTests { static class CloseCountingApplicationListener implements ApplicationListener { - static int closed = 0; + static int closed; @Override public void onApplicationEvent(ContextClosedEvent event) { diff --git a/module/spring-boot-elasticsearch/src/main/java/org/springframework/boot/elasticsearch/autoconfigure/ElasticsearchProperties.java b/module/spring-boot-elasticsearch/src/main/java/org/springframework/boot/elasticsearch/autoconfigure/ElasticsearchProperties.java index edca72a7bae..e487e5033c0 100644 --- a/module/spring-boot-elasticsearch/src/main/java/org/springframework/boot/elasticsearch/autoconfigure/ElasticsearchProperties.java +++ b/module/spring-boot-elasticsearch/src/main/java/org/springframework/boot/elasticsearch/autoconfigure/ElasticsearchProperties.java @@ -67,7 +67,7 @@ public class ElasticsearchProperties { /** * Whether to enable socket keep alive between client and Elasticsearch. */ - private boolean socketKeepAlive = false; + private boolean socketKeepAlive; /** * Prefix added to the path of every request sent to Elasticsearch. diff --git a/module/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/autoconfigure/FlywayMigrationInitializer.java b/module/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/autoconfigure/FlywayMigrationInitializer.java index bf635d9674f..6db15d3577b 100644 --- a/module/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/autoconfigure/FlywayMigrationInitializer.java +++ b/module/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/autoconfigure/FlywayMigrationInitializer.java @@ -36,7 +36,7 @@ public class FlywayMigrationInitializer implements InitializingBean, Ordered { private final @Nullable FlywayMigrationStrategy migrationStrategy; - private int order = 0; + private int order; /** * Create a new {@link FlywayMigrationInitializer} instance. diff --git a/module/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/autoconfigure/FlywayProperties.java b/module/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/autoconfigure/FlywayProperties.java index 082e4339396..9af24f3261a 100644 --- a/module/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/autoconfigure/FlywayProperties.java +++ b/module/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/autoconfigure/FlywayProperties.java @@ -252,7 +252,7 @@ public class FlywayProperties { * Whether to validate migrations and callbacks whose scripts do not obey the correct * naming convention. */ - private boolean validateMigrationNaming = false; + private boolean validateMigrationNaming; /** * Whether to automatically call validate when performing a migration. diff --git a/module/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerProperties.java b/module/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerProperties.java index 5d44a8f7883..89afd1946e8 100644 --- a/module/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerProperties.java +++ b/module/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerProperties.java @@ -94,19 +94,19 @@ public class FreeMarkerProperties { * Whether all request attributes should be added to the model prior to merging with * the template. */ - private boolean exposeRequestAttributes = false; + private boolean exposeRequestAttributes; /** * Whether all HttpSession attributes should be added to the model prior to merging * with the template. */ - private boolean exposeSessionAttributes = false; + private boolean exposeSessionAttributes; /** * Whether HttpServletRequest attributes are allowed to override (hide) controller * generated model attributes of the same name. */ - private boolean allowRequestOverride = false; + private boolean allowRequestOverride; /** * Whether to expose a RequestContext for use by Spring's macro library, under the @@ -118,7 +118,7 @@ public class FreeMarkerProperties { * Whether HttpSession attributes are allowed to override (hide) controller generated * model attributes of the same name. */ - private boolean allowSessionOverride = false; + private boolean allowSessionOverride; /** * Well-known FreeMarker keys which are passed to FreeMarker's Configuration. diff --git a/module/spring-boot-graphql/src/main/java/org/springframework/boot/graphql/autoconfigure/GraphQlProperties.java b/module/spring-boot-graphql/src/main/java/org/springframework/boot/graphql/autoconfigure/GraphQlProperties.java index 94dc5f2c8da..90bbe2283fa 100644 --- a/module/spring-boot-graphql/src/main/java/org/springframework/boot/graphql/autoconfigure/GraphQlProperties.java +++ b/module/spring-boot-graphql/src/main/java/org/springframework/boot/graphql/autoconfigure/GraphQlProperties.java @@ -192,7 +192,7 @@ public class GraphQlProperties { * Whether the endpoint that prints the schema is enabled. Schema is available * under spring.graphql.http.path + "/schema". */ - private boolean enabled = false; + private boolean enabled; public boolean isEnabled() { return this.enabled; @@ -216,7 +216,7 @@ public class GraphQlProperties { /** * Whether the default GraphiQL UI is enabled. */ - private boolean enabled = false; + private boolean enabled; public String getPath() { return this.path; diff --git a/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/GraphQlAutoConfigurationTests.java b/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/GraphQlAutoConfigurationTests.java index aba9d4bad4b..fbd7aad64de 100644 --- a/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/GraphQlAutoConfigurationTests.java +++ b/module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/GraphQlAutoConfigurationTests.java @@ -346,7 +346,7 @@ class GraphQlAutoConfigurationTests { public static class CustomRuntimeWiringConfigurer implements RuntimeWiringConfigurer { - public boolean applied = false; + public boolean applied; @Override public void configure(RuntimeWiring.Builder builder) { @@ -366,7 +366,7 @@ class GraphQlAutoConfigurationTests { public static class CustomGraphQlSourceBuilderCustomizer implements GraphQlSourceBuilderCustomizer { - public boolean applied = false; + public boolean applied; @Override public void customize(GraphQlSource.SchemaResourceBuilder builder) { diff --git a/module/spring-boot-groovy-templates/src/main/java/org/springframework/boot/groovy/template/autoconfigure/GroovyTemplateProperties.java b/module/spring-boot-groovy-templates/src/main/java/org/springframework/boot/groovy/template/autoconfigure/GroovyTemplateProperties.java index bcd0c8176e2..b11eba720cb 100644 --- a/module/spring-boot-groovy-templates/src/main/java/org/springframework/boot/groovy/template/autoconfigure/GroovyTemplateProperties.java +++ b/module/spring-boot-groovy-templates/src/main/java/org/springframework/boot/groovy/template/autoconfigure/GroovyTemplateProperties.java @@ -98,19 +98,19 @@ public class GroovyTemplateProperties { * Whether all request attributes should be added to the model prior to merging with * the template. */ - private boolean exposeRequestAttributes = false; + private boolean exposeRequestAttributes; /** * Whether all HttpSession attributes should be added to the model prior to merging * with the template. */ - private boolean exposeSessionAttributes = false; + private boolean exposeSessionAttributes; /** * Whether HttpServletRequest attributes are allowed to override (hide) controller * generated model attributes of the same name. */ - private boolean allowRequestOverride = false; + private boolean allowRequestOverride; /** * Whether to expose a RequestContext for use by Spring's macro library, under the @@ -122,7 +122,7 @@ public class GroovyTemplateProperties { * Whether HttpSession attributes are allowed to override (hide) controller generated * model attributes of the same name. */ - private boolean allowSessionOverride = false; + private boolean allowSessionOverride; /** * Whether models that are assignable to CharSequence are escaped automatically. diff --git a/module/spring-boot-h2console/src/main/java/org/springframework/boot/h2console/autoconfigure/H2ConsoleProperties.java b/module/spring-boot-h2console/src/main/java/org/springframework/boot/h2console/autoconfigure/H2ConsoleProperties.java index 941cc7d2b9d..048d86dee59 100644 --- a/module/spring-boot-h2console/src/main/java/org/springframework/boot/h2console/autoconfigure/H2ConsoleProperties.java +++ b/module/spring-boot-h2console/src/main/java/org/springframework/boot/h2console/autoconfigure/H2ConsoleProperties.java @@ -40,7 +40,7 @@ public class H2ConsoleProperties { /** * Whether to enable the console. */ - private boolean enabled = false; + private boolean enabled; private final Settings settings = new Settings(); @@ -72,12 +72,12 @@ public class H2ConsoleProperties { /** * Whether to enable trace output. */ - private boolean trace = false; + private boolean trace; /** * Whether to enable remote access. */ - private boolean webAllowOthers = false; + private boolean webAllowOthers; /** * Password to access preferences and tools of H2 Console. diff --git a/module/spring-boot-integration/src/main/java/org/springframework/boot/integration/autoconfigure/IntegrationProperties.java b/module/spring-boot-integration/src/main/java/org/springframework/boot/integration/autoconfigure/IntegrationProperties.java index 41622ace5cd..f9c4a146cb5 100644 --- a/module/spring-boot-integration/src/main/java/org/springframework/boot/integration/autoconfigure/IntegrationProperties.java +++ b/module/spring-boot-integration/src/main/java/org/springframework/boot/integration/autoconfigure/IntegrationProperties.java @@ -122,7 +122,7 @@ public class IntegrationProperties { * Whether to throw an exception when a reply is not expected anymore by a * gateway. */ - private boolean throwExceptionOnLateReply = false; + private boolean throwExceptionOnLateReply; /** * List of message header names that should not be populated into Message diff --git a/module/spring-boot-jackson/src/main/java/org/springframework/boot/jackson/autoconfigure/JacksonProperties.java b/module/spring-boot-jackson/src/main/java/org/springframework/boot/jackson/autoconfigure/JacksonProperties.java index 6be7ee646c7..1b2a77adef3 100644 --- a/module/spring-boot-jackson/src/main/java/org/springframework/boot/jackson/autoconfigure/JacksonProperties.java +++ b/module/spring-boot-jackson/src/main/java/org/springframework/boot/jackson/autoconfigure/JacksonProperties.java @@ -113,7 +113,7 @@ public class JacksonProperties { * Whether to configure Jackson 3 with the same defaults as Spring Boot previously * used for Jackson 2. */ - private boolean useJackson2Defaults = false; + private boolean useJackson2Defaults; /** * Whether to find and add modules to the auto-configured JsonMapper.Builder using diff --git a/module/spring-boot-jackson2/src/main/java/org/springframework/boot/jackson2/autoconfigure/Jackson2Properties.java b/module/spring-boot-jackson2/src/main/java/org/springframework/boot/jackson2/autoconfigure/Jackson2Properties.java index 64d287d80ac..e3efb82de6c 100644 --- a/module/spring-boot-jackson2/src/main/java/org/springframework/boot/jackson2/autoconfigure/Jackson2Properties.java +++ b/module/spring-boot-jackson2/src/main/java/org/springframework/boot/jackson2/autoconfigure/Jackson2Properties.java @@ -114,7 +114,7 @@ public class Jackson2Properties { * Time zone used when formatting dates. For instance, "America/Los_Angeles" or * "GMT+10". */ - private @Nullable TimeZone timeZone = null; + private @Nullable TimeZone timeZone; /** * Locale used for formatting. diff --git a/module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/autoconfigure/health/DataSourceHealthIndicatorProperties.java b/module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/autoconfigure/health/DataSourceHealthIndicatorProperties.java index 2626bde5c69..5af3d296397 100644 --- a/module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/autoconfigure/health/DataSourceHealthIndicatorProperties.java +++ b/module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/autoconfigure/health/DataSourceHealthIndicatorProperties.java @@ -32,7 +32,7 @@ public class DataSourceHealthIndicatorProperties { * Whether to ignore AbstractRoutingDataSources when creating database health * indicators. */ - private boolean ignoreRoutingDataSources = false; + private boolean ignoreRoutingDataSources; public boolean isIgnoreRoutingDataSources() { return this.ignoreRoutingDataSources; diff --git a/module/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/GracefulShutdown.java b/module/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/GracefulShutdown.java index b91e9dba518..1742a119356 100644 --- a/module/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/GracefulShutdown.java +++ b/module/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/GracefulShutdown.java @@ -46,7 +46,7 @@ final class GracefulShutdown { private final Supplier activeRequests; - private volatile boolean aborted = false; + private volatile boolean aborted; GracefulShutdown(Server server, Supplier activeRequests) { this.server = server; diff --git a/module/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyServerProperties.java b/module/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyServerProperties.java index b00c90d87b3..c4678b4630c 100644 --- a/module/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyServerProperties.java +++ b/module/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyServerProperties.java @@ -147,7 +147,7 @@ public class JettyServerProperties { /** * Enable access log. */ - private boolean enabled = false; + private boolean enabled; /** * Log format. diff --git a/module/spring-boot-jms/src/main/java/org/springframework/boot/jms/autoconfigure/JmsProperties.java b/module/spring-boot-jms/src/main/java/org/springframework/boot/jms/autoconfigure/JmsProperties.java index 0ac4f513719..ff601e6c81d 100644 --- a/module/spring-boot-jms/src/main/java/org/springframework/boot/jms/autoconfigure/JmsProperties.java +++ b/module/spring-boot-jms/src/main/java/org/springframework/boot/jms/autoconfigure/JmsProperties.java @@ -38,7 +38,7 @@ public class JmsProperties { /** * Whether the default destination type is topic. */ - private boolean pubSubDomain = false; + private boolean pubSubDomain; /** * Connection factory JNDI name. When set, takes precedence to others connection @@ -49,7 +49,7 @@ public class JmsProperties { /** * Whether the subscription is durable. */ - private boolean subscriptionDurable = false; + private boolean subscriptionDurable; /** * Client id of the connection. @@ -116,7 +116,7 @@ public class JmsProperties { /** * Whether to cache message consumers. */ - private boolean consumers = false; + private boolean consumers; /** * Whether to cache message producers. @@ -402,7 +402,7 @@ public class JmsProperties { /** * Whether to use transacted sessions. */ - private boolean transacted = false; + private boolean transacted; public AcknowledgeMode getAcknowledgeMode() { return this.acknowledgeMode; diff --git a/module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa/autoconfigure/JpaProperties.java b/module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa/autoconfigure/JpaProperties.java index 4d9f151e666..c065424b2b4 100644 --- a/module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa/autoconfigure/JpaProperties.java +++ b/module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa/autoconfigure/JpaProperties.java @@ -64,12 +64,12 @@ public class JpaProperties { /** * Whether to initialize the schema on startup. */ - private boolean generateDdl = false; + private boolean generateDdl; /** * Whether to enable logging of SQL statements. */ - private boolean showSql = false; + private boolean showSql; /** * Register OpenEntityManagerInViewInterceptor. Binds a JPA EntityManager to the diff --git a/module/spring-boot-kafka/src/main/java/org/springframework/boot/kafka/autoconfigure/KafkaProperties.java b/module/spring-boot-kafka/src/main/java/org/springframework/boot/kafka/autoconfigure/KafkaProperties.java index 913e54fef8d..5ee8472140e 100644 --- a/module/spring-boot-kafka/src/main/java/org/springframework/boot/kafka/autoconfigure/KafkaProperties.java +++ b/module/spring-boot-kafka/src/main/java/org/springframework/boot/kafka/autoconfigure/KafkaProperties.java @@ -1045,13 +1045,13 @@ public class KafkaProperties { * Whether the container should fail to start if at least one of the configured * topics are not present on the broker. */ - private boolean missingTopicsFatal = false; + private boolean missingTopicsFatal; /** * Whether the container stops after the current record is processed or after all * the records from the previous poll are processed. */ - private boolean immediateStop = false; + private boolean immediateStop; /** * Whether to auto start the container. @@ -1664,12 +1664,12 @@ public class KafkaProperties { /** * Cleanup the application’s local state directory on startup. */ - private boolean onStartup = false; + private boolean onStartup; /** * Cleanup the application’s local state directory on shutdown. */ - private boolean onShutdown = false; + private boolean onShutdown; public boolean isOnStartup() { return this.onStartup; diff --git a/module/spring-boot-ldap/src/main/java/org/springframework/boot/ldap/autoconfigure/LdapProperties.java b/module/spring-boot-ldap/src/main/java/org/springframework/boot/ldap/autoconfigure/LdapProperties.java index 56d99836bca..636834cf6cf 100644 --- a/module/spring-boot-ldap/src/main/java/org/springframework/boot/ldap/autoconfigure/LdapProperties.java +++ b/module/spring-boot-ldap/src/main/java/org/springframework/boot/ldap/autoconfigure/LdapProperties.java @@ -159,13 +159,13 @@ public class LdapProperties { * Whether PartialResultException should be ignored in searches through the * LdapTemplate. */ - private boolean ignorePartialResultException = false; + private boolean ignorePartialResultException; /** * Whether NameNotFoundException should be ignored in searches through the * LdapTemplate. */ - private boolean ignoreNameNotFoundException = false; + private boolean ignoreNameNotFoundException; /** * Whether SizeLimitExceededException should be ignored in searches through the diff --git a/module/spring-boot-ldap/src/main/java/org/springframework/boot/ldap/autoconfigure/embedded/EmbeddedLdapProperties.java b/module/spring-boot-ldap/src/main/java/org/springframework/boot/ldap/autoconfigure/embedded/EmbeddedLdapProperties.java index 5259660da3d..d348491af48 100644 --- a/module/spring-boot-ldap/src/main/java/org/springframework/boot/ldap/autoconfigure/embedded/EmbeddedLdapProperties.java +++ b/module/spring-boot-ldap/src/main/java/org/springframework/boot/ldap/autoconfigure/embedded/EmbeddedLdapProperties.java @@ -39,7 +39,7 @@ public class EmbeddedLdapProperties { /** * Embedded LDAP port. */ - private int port = 0; + private int port; /** * Embedded LDAP credentials. diff --git a/module/spring-boot-mail/src/main/java/org/springframework/boot/mail/autoconfigure/MailProperties.java b/module/spring-boot-mail/src/main/java/org/springframework/boot/mail/autoconfigure/MailProperties.java index 748868f2e39..4024232ac83 100644 --- a/module/spring-boot-mail/src/main/java/org/springframework/boot/mail/autoconfigure/MailProperties.java +++ b/module/spring-boot-mail/src/main/java/org/springframework/boot/mail/autoconfigure/MailProperties.java @@ -153,7 +153,7 @@ public class MailProperties { * Whether to enable SSL support. If enabled, 'mail.(protocol).ssl.enable' * property is set to 'true'. */ - private boolean enabled = false; + private boolean enabled; /** * SSL bundle name. If set, 'mail.(protocol).ssl.socketFactory' property is set to diff --git a/module/spring-boot-micrometer-metrics/src/main/java/org/springframework/boot/micrometer/metrics/autoconfigure/export/elastic/ElasticProperties.java b/module/spring-boot-micrometer-metrics/src/main/java/org/springframework/boot/micrometer/metrics/autoconfigure/export/elastic/ElasticProperties.java index 2c7fa6b8fc6..32aa31fa7ef 100644 --- a/module/spring-boot-micrometer-metrics/src/main/java/org/springframework/boot/micrometer/metrics/autoconfigure/export/elastic/ElasticProperties.java +++ b/module/spring-boot-micrometer-metrics/src/main/java/org/springframework/boot/micrometer/metrics/autoconfigure/export/elastic/ElasticProperties.java @@ -85,7 +85,7 @@ public class ElasticProperties extends StepRegistryProperties { * Whether to enable _source in the default index template when auto-creating the * index. */ - private boolean enableSource = false; + private boolean enableSource; public String getHost() { return this.host; diff --git a/module/spring-boot-micrometer-metrics/src/main/java/org/springframework/boot/micrometer/metrics/autoconfigure/export/stackdriver/StackdriverProperties.java b/module/spring-boot-micrometer-metrics/src/main/java/org/springframework/boot/micrometer/metrics/autoconfigure/export/stackdriver/StackdriverProperties.java index 9fc55efda22..620a79b07ac 100644 --- a/module/spring-boot-micrometer-metrics/src/main/java/org/springframework/boot/micrometer/metrics/autoconfigure/export/stackdriver/StackdriverProperties.java +++ b/module/spring-boot-micrometer-metrics/src/main/java/org/springframework/boot/micrometer/metrics/autoconfigure/export/stackdriver/StackdriverProperties.java @@ -54,7 +54,7 @@ public class StackdriverProperties extends StepRegistryProperties { * published as the GAUGE MetricKind. When true, counter metrics are published as the * CUMULATIVE MetricKind. */ - private boolean useSemanticMetricTypes = false; + private boolean useSemanticMetricTypes; /** * Prefix for metric type. Valid prefixes are described in the Google Cloud diff --git a/module/spring-boot-micrometer-tracing-brave/src/main/java/org/springframework/boot/micrometer/tracing/brave/autoconfigure/BraveTracingProperties.java b/module/spring-boot-micrometer-tracing-brave/src/main/java/org/springframework/boot/micrometer/tracing/brave/autoconfigure/BraveTracingProperties.java index 6885fc89c0c..b30fd87b190 100644 --- a/module/spring-boot-micrometer-tracing-brave/src/main/java/org/springframework/boot/micrometer/tracing/brave/autoconfigure/BraveTracingProperties.java +++ b/module/spring-boot-micrometer-tracing-brave/src/main/java/org/springframework/boot/micrometer/tracing/brave/autoconfigure/BraveTracingProperties.java @@ -31,7 +31,7 @@ public class BraveTracingProperties { * Whether the propagation type and tracing backend support sharing the span ID * between client and server spans. Requires B3 propagation and a compatible backend. */ - private boolean spanJoiningSupported = false; + private boolean spanJoiningSupported; public boolean isSpanJoiningSupported() { return this.spanJoiningSupported; diff --git a/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/autoconfigure/StandardMongoClientSettingsBuilderCustomizer.java b/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/autoconfigure/StandardMongoClientSettingsBuilderCustomizer.java index 745ea3996f2..86ab98132e5 100644 --- a/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/autoconfigure/StandardMongoClientSettingsBuilderCustomizer.java +++ b/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/autoconfigure/StandardMongoClientSettingsBuilderCustomizer.java @@ -39,7 +39,7 @@ public class StandardMongoClientSettingsBuilderCustomizer implements MongoClient private final MongoConnectionDetails connectionDetails; - private int order = 0; + private int order; public StandardMongoClientSettingsBuilderCustomizer(MongoConnectionDetails connectionDetails, UuidRepresentation uuidRepresentation) { diff --git a/module/spring-boot-mustache/src/main/java/org/springframework/boot/mustache/autoconfigure/MustacheProperties.java b/module/spring-boot-mustache/src/main/java/org/springframework/boot/mustache/autoconfigure/MustacheProperties.java index 0f28cda9131..558d90b9e49 100644 --- a/module/spring-boot-mustache/src/main/java/org/springframework/boot/mustache/autoconfigure/MustacheProperties.java +++ b/module/spring-boot-mustache/src/main/java/org/springframework/boot/mustache/autoconfigure/MustacheProperties.java @@ -146,13 +146,13 @@ public class MustacheProperties { * Whether HttpServletRequest attributes are allowed to override (hide) controller * generated model attributes of the same name. */ - private boolean allowRequestOverride = false; + private boolean allowRequestOverride; /** * Whether HttpSession attributes are allowed to override (hide) controller * generated model attributes of the same name. */ - private boolean allowSessionOverride = false; + private boolean allowSessionOverride; /** * Whether to enable template caching. @@ -168,13 +168,13 @@ public class MustacheProperties { * Whether all request attributes should be added to the model prior to merging * with the template. */ - private boolean exposeRequestAttributes = false; + private boolean exposeRequestAttributes; /** * Whether all HttpSession attributes should be added to the model prior to * merging with the template. */ - private boolean exposeSessionAttributes = false; + private boolean exposeSessionAttributes; /** * Whether to expose a RequestContext for use by Spring's macro library, under the diff --git a/module/spring-boot-neo4j/src/main/java/org/springframework/boot/neo4j/autoconfigure/Neo4jProperties.java b/module/spring-boot-neo4j/src/main/java/org/springframework/boot/neo4j/autoconfigure/Neo4jProperties.java index ff96ab80a1f..81f9e57e343 100644 --- a/module/spring-boot-neo4j/src/main/java/org/springframework/boot/neo4j/autoconfigure/Neo4jProperties.java +++ b/module/spring-boot-neo4j/src/main/java/org/springframework/boot/neo4j/autoconfigure/Neo4jProperties.java @@ -153,7 +153,7 @@ public class Neo4jProperties { /** * Whether to log leaked sessions. */ - private boolean logLeakedSessions = false; + private boolean logLeakedSessions; /** * Maximum amount of connections in the connection pool towards a single database. @@ -225,7 +225,7 @@ public class Neo4jProperties { /** * Whether the driver should use encrypted traffic. */ - private boolean encrypted = false; + private boolean encrypted; /** * Trust strategy to use. diff --git a/module/spring-boot-pulsar/src/main/java/org/springframework/boot/pulsar/autoconfigure/PulsarProperties.java b/module/spring-boot-pulsar/src/main/java/org/springframework/boot/pulsar/autoconfigure/PulsarProperties.java index fe0d4aac650..001939b0362 100644 --- a/module/spring-boot-pulsar/src/main/java/org/springframework/boot/pulsar/autoconfigure/PulsarProperties.java +++ b/module/spring-boot-pulsar/src/main/java/org/springframework/boot/pulsar/autoconfigure/PulsarProperties.java @@ -370,7 +370,7 @@ public class PulsarProperties { * Whether to throw an exception if any failure is encountered during server * shutdown while enforcing stop policy on functions. */ - private boolean propagateStopFailures = false; + private boolean propagateStopFailures; public boolean isFailFast() { return this.failFast; @@ -589,13 +589,13 @@ public class PulsarProperties { /** * Priority level for shared subscription consumers. */ - private int priorityLevel = 0; + private int priorityLevel; /** * Whether to read messages from the compacted topic rather than the full message * backlog. */ - private boolean readCompacted = false; + private boolean readCompacted; /** * Dead letter policy to use. @@ -611,7 +611,7 @@ public class PulsarProperties { /** * Whether to auto retry messages. */ - private boolean retryEnable = false; + private boolean retryEnable; public @Nullable String getName() { return this.name; diff --git a/module/spring-boot-quartz/src/main/java/org/springframework/boot/quartz/autoconfigure/QuartzProperties.java b/module/spring-boot-quartz/src/main/java/org/springframework/boot/quartz/autoconfigure/QuartzProperties.java index 6e8f6e1d887..14c405cb9e6 100644 --- a/module/spring-boot-quartz/src/main/java/org/springframework/boot/quartz/autoconfigure/QuartzProperties.java +++ b/module/spring-boot-quartz/src/main/java/org/springframework/boot/quartz/autoconfigure/QuartzProperties.java @@ -59,12 +59,12 @@ public class QuartzProperties { /** * Whether to wait for running jobs to complete on shutdown. */ - private boolean waitForJobsToCompleteOnShutdown = false; + private boolean waitForJobsToCompleteOnShutdown; /** * Whether configured jobs should overwrite existing job definitions. */ - private boolean overwriteExistingJobs = false; + private boolean overwriteExistingJobs; /** * Additional Quartz Scheduler properties. diff --git a/module/spring-boot-r2dbc/src/main/java/org/springframework/boot/r2dbc/autoconfigure/R2dbcProperties.java b/module/spring-boot-r2dbc/src/main/java/org/springframework/boot/r2dbc/autoconfigure/R2dbcProperties.java index 91b97f5dee6..f9388487c20 100644 --- a/module/spring-boot-r2dbc/src/main/java/org/springframework/boot/r2dbc/autoconfigure/R2dbcProperties.java +++ b/module/spring-boot-r2dbc/src/main/java/org/springframework/boot/r2dbc/autoconfigure/R2dbcProperties.java @@ -140,7 +140,7 @@ public class R2dbcProperties { /** * Minimal number of idle connections. */ - private int minIdle = 0; + private int minIdle; /** * Maximum amount of time that a connection is allowed to sit idle in the pool. diff --git a/module/spring-boot-security-oauth2-authorization-server/src/main/java/org/springframework/boot/security/oauth2/server/authorization/autoconfigure/servlet/OAuth2AuthorizationServerProperties.java b/module/spring-boot-security-oauth2-authorization-server/src/main/java/org/springframework/boot/security/oauth2/server/authorization/autoconfigure/servlet/OAuth2AuthorizationServerProperties.java index 0c8b95105cf..ede513ef61a 100644 --- a/module/spring-boot-security-oauth2-authorization-server/src/main/java/org/springframework/boot/security/oauth2/server/authorization/autoconfigure/servlet/OAuth2AuthorizationServerProperties.java +++ b/module/spring-boot-security-oauth2-authorization-server/src/main/java/org/springframework/boot/security/oauth2/server/authorization/autoconfigure/servlet/OAuth2AuthorizationServerProperties.java @@ -50,7 +50,7 @@ public class OAuth2AuthorizationServerProperties implements InitializingBean { * the issuer identifier enables supporting multiple issuers per host in a * multi-tenant hosting configuration. */ - private boolean multipleIssuersAllowed = false; + private boolean multipleIssuersAllowed; /** * Registered clients of the Authorization Server. @@ -294,7 +294,7 @@ public class OAuth2AuthorizationServerProperties implements InitializingBean { /** * Whether authorization consent is required when the client requests access. */ - private boolean requireAuthorizationConsent = false; + private boolean requireAuthorizationConsent; /** * URL for the client's JSON Web Key Set. diff --git a/module/spring-boot-servlet/src/main/java/org/springframework/boot/servlet/autoconfigure/MultipartProperties.java b/module/spring-boot-servlet/src/main/java/org/springframework/boot/servlet/autoconfigure/MultipartProperties.java index 92dcdbee07f..a310fc77509 100644 --- a/module/spring-boot-servlet/src/main/java/org/springframework/boot/servlet/autoconfigure/MultipartProperties.java +++ b/module/spring-boot-servlet/src/main/java/org/springframework/boot/servlet/autoconfigure/MultipartProperties.java @@ -79,13 +79,13 @@ public class MultipartProperties { * Whether to resolve the multipart request lazily at the time of file or parameter * access. */ - private boolean resolveLazily = false; + private boolean resolveLazily; /** * Whether to resolve the multipart request strictly complying with the Servlet * specification, only to be used for "multipart/form-data" requests. */ - private boolean strictServletCompliance = false; + private boolean strictServletCompliance; public boolean isEnabled() { return this.enabled; diff --git a/module/spring-boot-sql/src/main/java/org/springframework/boot/sql/autoconfigure/init/SqlInitializationProperties.java b/module/spring-boot-sql/src/main/java/org/springframework/boot/sql/autoconfigure/init/SqlInitializationProperties.java index e3771776ed7..d690d9fcffb 100644 --- a/module/spring-boot-sql/src/main/java/org/springframework/boot/sql/autoconfigure/init/SqlInitializationProperties.java +++ b/module/spring-boot-sql/src/main/java/org/springframework/boot/sql/autoconfigure/init/SqlInitializationProperties.java @@ -65,7 +65,7 @@ public class SqlInitializationProperties { /** * Whether initialization should continue when an error occurs. */ - private boolean continueOnError = false; + private boolean continueOnError; /** * Statement separator in the schema and data scripts. diff --git a/module/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf/autoconfigure/ThymeleafProperties.java b/module/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf/autoconfigure/ThymeleafProperties.java index 002ef18576d..1ac5350bb1c 100644 --- a/module/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf/autoconfigure/ThymeleafProperties.java +++ b/module/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf/autoconfigure/ThymeleafProperties.java @@ -106,7 +106,7 @@ public class ThymeleafProperties { * Whether hidden form inputs acting as markers for checkboxes should be rendered * before the checkbox element itself. */ - private boolean renderHiddenMarkersBeforeCheckboxes = false; + private boolean renderHiddenMarkersBeforeCheckboxes; private final Servlet servlet = new Servlet(); diff --git a/module/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/GracefulShutdown.java b/module/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/GracefulShutdown.java index 9d8d7d217e8..f732eea8a24 100644 --- a/module/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/GracefulShutdown.java +++ b/module/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/GracefulShutdown.java @@ -44,7 +44,7 @@ final class GracefulShutdown { private final Tomcat tomcat; - private volatile boolean aborted = false; + private volatile boolean aborted; GracefulShutdown(Tomcat tomcat) { this.tomcat = tomcat; diff --git a/module/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatServerProperties.java b/module/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatServerProperties.java index 2b607d7fbf5..9bfb7e8ae32 100644 --- a/module/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatServerProperties.java +++ b/module/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatServerProperties.java @@ -407,7 +407,7 @@ public class TomcatServerProperties { /** * Enable access log. */ - private boolean enabled = false; + private boolean enabled; /** * Whether logging of the request will only be enabled if @@ -458,7 +458,7 @@ public class TomcatServerProperties { * Whether to check for log file existence so it can be recreated if an external * process has renamed it. */ - private boolean checkExists = false; + private boolean checkExists; /** * Whether to enable access log rotation. @@ -469,7 +469,7 @@ public class TomcatServerProperties { * Whether to defer inclusion of the date stamp in the file name until rotate * time. */ - private boolean renameOnRotate = false; + private boolean renameOnRotate; /** * Number of days to retain the access log files before they are removed. @@ -484,13 +484,13 @@ public class TomcatServerProperties { /** * Whether to use IPv6 canonical representation format as defined by RFC 5952. */ - private boolean ipv6Canonical = false; + private boolean ipv6Canonical; /** * Set request attributes for the IP address, Hostname, protocol, and port used * for the request. */ - private boolean requestAttributesEnabled = false; + private boolean requestAttributesEnabled; /** * Whether to buffer output such that it is flushed only periodically. diff --git a/module/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/ServerProperties.java b/module/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/ServerProperties.java index e708fd9abe1..5669c08ad49 100644 --- a/module/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/ServerProperties.java +++ b/module/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/ServerProperties.java @@ -235,7 +235,7 @@ public class ServerProperties { /** * Whether to register the default Servlet with the container. */ - private boolean registerDefaultServlet = false; + private boolean registerDefaultServlet; private final Encoding encoding = new Encoding(); diff --git a/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxProperties.java b/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxProperties.java index ea37ff12760..7a5d1932924 100644 --- a/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxProperties.java +++ b/module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxProperties.java @@ -161,7 +161,7 @@ public class WebFluxProperties { /** * Whether RFC 9457 Problem Details support should be enabled. */ - private boolean enabled = false; + private boolean enabled; public boolean isEnabled() { return this.enabled; diff --git a/module/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java b/module/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java index 434a9fa8f6f..cd03fcdc0fd 100644 --- a/module/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java +++ b/module/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java @@ -1095,7 +1095,7 @@ class WebFluxAutoConfigurationTests { @Configuration(proxyBeanMethods = false) static class CustomRequestMappingHandlerAdapter { - private int handlerAdapters = 0; + private int handlerAdapters; @Bean WebFluxRegistrations webFluxRegistrationsHandlerAdapter() { @@ -1126,7 +1126,7 @@ class WebFluxAutoConfigurationTests { @Configuration(proxyBeanMethods = false) static class CustomRequestMappingHandlerMapping { - private int handlerMappings = 0; + private int handlerMappings; @Bean WebFluxRegistrations webFluxRegistrationsHandlerMapping() { diff --git a/module/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/autoconfigure/WebMvcProperties.java b/module/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/autoconfigure/WebMvcProperties.java index f4bac736926..a95ff9b2231 100644 --- a/module/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/autoconfigure/WebMvcProperties.java +++ b/module/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/autoconfigure/WebMvcProperties.java @@ -54,7 +54,7 @@ public class WebMvcProperties { /** * Whether to dispatch TRACE requests to the FrameworkServlet doService method. */ - private boolean dispatchTraceRequest = false; + private boolean dispatchTraceRequest; /** * Whether to dispatch OPTIONS requests to the FrameworkServlet doService method. @@ -76,7 +76,7 @@ public class WebMvcProperties { * Whether to enable warn logging of exceptions resolved by a * "HandlerExceptionResolver", except for "DefaultHandlerExceptionResolver". */ - private boolean logResolvedException = false; + private boolean logResolvedException; /** * Path pattern used for static resources. @@ -315,7 +315,7 @@ public class WebMvcProperties { * Whether a request parameter ("format" by default) should be used to determine * the requested media type. */ - private boolean favorParameter = false; + private boolean favorParameter; /** * Query parameter name to use when "favor-parameter" is enabled. @@ -459,7 +459,7 @@ public class WebMvcProperties { /** * Whether RFC 9457 Problem Details support should be enabled. */ - private boolean enabled = false; + private boolean enabled; public boolean isEnabled() { return this.enabled; diff --git a/module/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/autoconfigure/WebMvcAutoConfigurationTests.java b/module/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/autoconfigure/WebMvcAutoConfigurationTests.java index c8384e7c9ac..362228a292c 100644 --- a/module/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/autoconfigure/WebMvcAutoConfigurationTests.java +++ b/module/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/autoconfigure/WebMvcAutoConfigurationTests.java @@ -1332,7 +1332,7 @@ class WebMvcAutoConfigurationTests { @Configuration(proxyBeanMethods = false) static class CustomRequestMappingHandlerAdapter { - private int handlerAdapters = 0; + private int handlerAdapters; @Bean WebMvcRegistrations webMvcRegistrationsHandlerAdapter() { @@ -1356,7 +1356,7 @@ class WebMvcAutoConfigurationTests { @Configuration(proxyBeanMethods = false) static class CustomExceptionHandlerExceptionResolver { - private int exceptionResolvers = 0; + private int exceptionResolvers; @Bean WebMvcRegistrations webMvcRegistrationsExceptionResolver() { diff --git a/system-test/spring-boot-image-system-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java b/system-test/spring-boot-image-system-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java index aeb02374d04..58114634865 100644 --- a/system-test/spring-boot-image-system-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java +++ b/system-test/spring-boot-image-system-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java @@ -569,7 +569,7 @@ class PaketoBuilderTests { private static class DigestCapturingCondition extends Condition { - private static String digest = null; + private static String digest; DigestCapturingCondition() { super(predicate(), "a value starting with 'sha256:'");