diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/BomExtension.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/BomExtension.java index 114b19280f..7280d4a833 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/bom/BomExtension.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/BomExtension.java @@ -186,7 +186,7 @@ public class BomExtension { private final AlignWithHandler alignWith; - private boolean considerSnapshots = false; + private boolean considerSnapshots; private String version; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointAutoConfigurationTests.java index d1c8a0b0a6..0586ad616c 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,7 +87,7 @@ class LiquibaseEndpointAutoConfigurationTests { SpringLiquibase liquibase() { return new DataSourceClosingSpringLiquibase() { - private boolean propertiesSet = false; + private boolean propertiesSet; @Override public void setCloseDataSourceOnceMigrated(boolean closeDataSourceOnceMigrated) { diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/jms/JmsHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/jms/JmsHealthIndicatorTests.java index 2e005d591d..09dc073db8 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/jms/JmsHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/jms/JmsHealthIndicatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,7 +117,7 @@ class JmsHealthIndicatorTests { private static final class UnresponsiveStartAnswer implements Answer { - private boolean connectionClosed = false; + private boolean connectionClosed; private final Object monitor = new Object(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java index c695b70a98..1feab54711 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java @@ -1224,7 +1224,7 @@ class FlywayAutoConfigurationTests { @Component static class MockFlywayMigrationStrategy implements FlywayMigrationStrategy { - private boolean called = false; + private boolean called; @Override public void migrate(Flyway flyway) { diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java index 16b1609060..23a7dc8ce6 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java @@ -116,7 +116,7 @@ public class Restarter { private final UncaughtExceptionHandler exceptionHandler; - private boolean finished = false; + private boolean finished; private final List rootContexts = new CopyOnWriteArrayList<>(); diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/AbstractApplicationContextRunner.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/AbstractApplicationContextRunner.java index 26c7d022a6..41b2523375 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/AbstractApplicationContextRunner.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/AbstractApplicationContextRunner.java @@ -509,9 +509,9 @@ public abstract class AbstractApplicationContextRunner[] additionalContextInterfaces; - private boolean allowBeanDefinitionOverriding = false; + private boolean allowBeanDefinitionOverriding; - private boolean allowCircularReferences = false; + private boolean allowCircularReferences; private List> initializers = Collections.emptyList(); diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestClientCustomizer.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestClientCustomizer.java index fef4c1af06..d2696008df 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestClientCustomizer.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestClientCustomizer.java @@ -68,7 +68,7 @@ public class MockServerRestClientCustomizer implements RestClientCustomizer { private final Supplier expectationManagerSupplier; - private boolean bufferContent = false; + private boolean bufferContent; public MockServerRestClientCustomizer() { this(SimpleRequestExpectationManager::new); diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizer.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizer.java index 985fce7ce1..06b3d62af0 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizer.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizer.java @@ -70,7 +70,7 @@ public class MockServerRestTemplateCustomizer implements RestTemplateCustomizer private boolean detectRootUri = true; - private boolean bufferContent = false; + private boolean bufferContent; public MockServerRestTemplateCustomizer() { this(SimpleRequestExpectationManager::new); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Phase.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Phase.java index 439511409d..992541a914 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Phase.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Phase.java @@ -1,5 +1,9 @@ /* +<<<<<<< HEAD * Copyright 2012-2024 the original author or authors. +======= + * Copyright 2012-2025 the original author or authors. +>>>>>>> 3.3.x * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +42,7 @@ class Phase { private final String name; - private boolean daemonAccess = false; + private boolean daemonAccess; private final List args = new ArrayList<>(); @@ -50,7 +54,7 @@ class Phase { private String networkMode; - private boolean requiresApp = false; + private boolean requiresApp; /** * Create a new {@link Phase} instance. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java index 332deba5f8..5fb7f6ccf8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,7 +67,7 @@ public class GradleBuild { private final List expectedDeprecationMessages = new ArrayList<>(); - private boolean configurationCache = false; + private boolean configurationCache; private final Map scriptProperties = new HashMap<>(); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java index ea58e7dfc3..0862960283 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java @@ -89,7 +89,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * @since 1.0.0 */ @Parameter(property = "spring-boot.run.addResources", defaultValue = "false") - private boolean addResources = false; + private boolean addResources; /** * Path to agent jars. @@ -105,7 +105,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * @since 1.0.0 */ @Parameter(property = "spring-boot.run.noverify") - private boolean noverify = false; + private boolean noverify; /** * Current working directory to use for the application. If not specified, basedir diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationProperties.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationProperties.java index f266772f06..e03818c1a8 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationProperties.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationProperties.java @@ -58,7 +58,7 @@ class ApplicationProperties { /** * Whether initialization should be performed lazily. */ - private boolean lazyInitialization = false; + private boolean lazyInitialization; /** * Whether to log information about the application when it starts. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index 51abb0c7c5..e39887e4e6 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -233,7 +233,7 @@ public class SpringApplication { private Set additionalProfiles = Collections.emptySet(); - private boolean isCustomEnvironment = false; + private boolean isCustomEnvironment; private String environmentPrefix; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrar.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrar.java index ac7f33a84f..ea1469de29 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrar.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrar.java @@ -61,9 +61,9 @@ public class SpringApplicationAdminMXBeanRegistrar implements ApplicationContext private final ObjectName objectName; - private boolean ready = false; + private boolean ready; - private boolean embeddedWebApplication = false; + private boolean embeddedWebApplication; public SpringApplicationAdminMXBeanRegistrar(String name) throws MalformedObjectNameException { this.objectName = new ObjectName(name); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java index b479568fcb..520d17c4e7 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -92,7 +92,7 @@ public class SpringApplicationBuilder { private boolean registerShutdownHookApplied; - private boolean configuredAsChild = false; + private boolean configuredAsChild; public SpringApplicationBuilder(Class... sources) { this(null, sources); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/AbstractScriptDatabaseInitializer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/AbstractScriptDatabaseInitializer.java index 830e47a2ac..b51eceedb5 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/AbstractScriptDatabaseInitializer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/AbstractScriptDatabaseInitializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -188,7 +188,7 @@ public abstract class AbstractScriptDatabaseInitializer implements ResourceLoade private final List resources; - private boolean continueOnError = false; + private boolean continueOnError; private String separator = ";"; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/DatabaseInitializationSettings.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/DatabaseInitializationSettings.java index bc2a1ccf18..0339e21167 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/DatabaseInitializationSettings.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/DatabaseInitializationSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ public class DatabaseInitializationSettings { private List dataLocations; - private boolean continueOnError = false; + private boolean continueOnError; private String separator = ";"; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java index 4bc7f552c9..a62f79947d 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java @@ -104,7 +104,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac private boolean eagerFilterInit = true; - private boolean preservePathOnForward = false; + private boolean preservePathOnForward; /** * Create a new {@link UndertowServletWebServerFactory} instance. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServerFactoryDelegate.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServerFactoryDelegate.java index d78b3cc404..ebae149797 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServerFactoryDelegate.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServerFactoryDelegate.java @@ -69,7 +69,7 @@ class UndertowWebServerFactoryDelegate { private String accessLogSuffix; - private boolean accessLogEnabled = false; + private boolean accessLogEnabled; private boolean accessLogRotate = true; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Compression.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Compression.java index 1f894939ac..04ef7e47f8 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Compression.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Compression.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.springframework.util.unit.DataSize; */ public class Compression { - private boolean enabled = false; + private boolean enabled; private String[] mimeTypes = new String[] { "text/html", "text/xml", "text/plain", "text/css", "text/javascript", "application/javascript", "application/json", "application/xml" }; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Http2.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Http2.java index a203072300..ae5cf52f8a 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Http2.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Http2.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ package org.springframework.boot.web.server; */ public class Http2 { - private boolean enabled = false; + private boolean enabled; /** * Return whether to enable HTTP/2 support, if the current environment supports it. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBean.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBean.java index 605c5eaa8d..0225c574ef 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBean.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBean.java @@ -55,7 +55,7 @@ public abstract class AbstractFilterRegistrationBean extends D private EnumSet dispatcherTypes; - private boolean matchAfter = false; + private boolean matchAfter; /** * Create a new instance to be registered with the specified diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java index a4eb069459..97b29bcb8e 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java @@ -68,7 +68,7 @@ public abstract class AbstractServletWebServerFactory extends AbstractConfigurab private Session session = new Session(); - private boolean registerDefaultServlet = false; + private boolean registerDefaultServlet; private MimeMappings mimeMappings = MimeMappings.lazyCopy(MimeMappings.DEFAULT); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java index 761cfbb17c..b70dff0ddb 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -314,7 +314,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry, Ordered { private String message; - private boolean hasErrorToSend = false; + private boolean hasErrorToSend; ErrorWrapperResponse(HttpServletResponse response) { super(response); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java index 4419158187..fed962a140 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java @@ -691,7 +691,7 @@ class LoggingApplicationListenerTests { static final class TestCleanupLoggingSystem extends LoggingSystem { - private boolean cleanedUp = false; + private boolean cleanedUp; TestCleanupLoggingSystem(ClassLoader classLoader) { }