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 6107e6b444..8816d0f301 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 @@ -108,7 +108,7 @@ public class BomExtension { } public void library(String name, Action action) { - this.library(name, null, action); + library(name, null, action); } public void library(String name, String version, Action action) { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java index 8b9ecef470..5b8d70f71a 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java @@ -57,7 +57,7 @@ class ReactiveCloudFoundrySecurityService { ReactiveCloudFoundrySecurityService(WebClient.Builder webClientBuilder, String cloudControllerUrl, boolean skipSslValidation) { - Assert.notNull(webClientBuilder, "Webclient must not be null"); + Assert.notNull(webClientBuilder, "WebClient must not be null"); Assert.notNull(cloudControllerUrl, "CloudControllerUrl must not be null"); if (skipSslValidation) { webClientBuilder.clientConnector(buildTrustAllSslConnector()); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/exemplars/ExemplarsAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/exemplars/ExemplarsAutoConfiguration.java index d5b0f9b0c3..c5d21e5ef2 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/exemplars/ExemplarsAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/exemplars/ExemplarsAutoConfiguration.java @@ -55,7 +55,7 @@ public class ExemplarsAutoConfiguration { /** * Since the MeterRegistry can depend on the {@link Tracer} (Exemplars) and the * {@link Tracer} can depend on the MeterRegistry (recording metrics), this - * {@link SpanContextSupplier} breaks the circle by lazily loading the {@link Tracer}. + * {@link SpanContextSupplier} breaks the cycle by lazily loading the {@link Tracer}. */ static class LazyTracingSpanContextSupplier implements SpanContextSupplier { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurationsSenderConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurationsSenderConfigurationTests.java index 892e3e0175..43f7577d04 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurationsSenderConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurationsSenderConfigurationTests.java @@ -93,7 +93,7 @@ class ZipkinConfigurationsSenderConfigurationTests { } @Test - void willUseRestTemplateInNonWebApplicationIfUrlConnectionSenderAndWebclientAreNotAvailable() { + void willUseRestTemplateInNonWebApplicationIfUrlConnectionSenderAndWebClientAreNotAvailable() { this.contextRunner.withUserConfiguration(RestTemplateConfiguration.class) .withClassLoader(new FilteredClassLoader(URLConnectionSender.class, WebClient.class)).run((context) -> { assertThat(context).doesNotHaveBean(URLConnectionSender.class); diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java index f9b5131cf8..322cde0382 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java @@ -467,7 +467,7 @@ public class ConfigurationPropertiesReportEndpoint implements ApplicationContext } /** - * {@link SimpleModule} for configure the serializer. + * {@link SimpleModule} for configuring the serializer. */ private static final class ConfigurationPropertiesModule extends SimpleModule { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java index 3d41dcafd4..2714d01b72 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java @@ -1270,12 +1270,12 @@ public class KafkaProperties { private void validate() { MutuallyExclusiveConfigurationPropertiesException.throwIfMultipleNonNullValuesIn((entries) -> { - entries.put("spring.kafka.ssl.key-store-key", this.getKeyStoreKey()); - entries.put("spring.kafka.ssl.key-store-location", this.getKeyStoreLocation()); + entries.put("spring.kafka.ssl.key-store-key", getKeyStoreKey()); + entries.put("spring.kafka.ssl.key-store-location", getKeyStoreLocation()); }); MutuallyExclusiveConfigurationPropertiesException.throwIfMultipleNonNullValuesIn((entries) -> { - entries.put("spring.kafka.ssl.trust-store-certificates", this.getTrustStoreCertificates()); - entries.put("spring.kafka.ssl.trust-store-location", this.getTrustStoreLocation()); + entries.put("spring.kafka.ssl.trust-store-certificates", getTrustStoreCertificates()); + entries.put("spring.kafka.ssl.trust-store-location", getTrustStoreLocation()); }); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests.java index 46b4524ce8..ae2202a5c7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests.java @@ -84,11 +84,11 @@ class CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests { @Override protected void containerIsCreated(String containerId) { - String config = this.copyFileFromContainer("/etc/cassandra/cassandra.yaml", + String config = copyFileFromContainer("/etc/cassandra/cassandra.yaml", (stream) -> StreamUtils.copyToString(stream, StandardCharsets.UTF_8)); String updatedConfig = config.replace("authenticator: AllowAllAuthenticator", "authenticator: PasswordAuthenticator"); - this.copyFileToContainer(Transferable.of(updatedConfig.getBytes(StandardCharsets.UTF_8)), + copyFileToContainer(Transferable.of(updatedConfig.getBytes(StandardCharsets.UTF_8)), "/etc/cassandra/cassandra.yaml"); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java index 4d5b717b03..27c6d647c9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java @@ -638,9 +638,9 @@ class WebFluxAutoConfigurationTests { @Test void problemDetailsBacksOffWhenExceptionHandler() { this.contextRunner.withPropertyValues("spring.webflux.problemdetails.enabled:true") - .withUserConfiguration(CustomExceptionResolverConfiguration.class) + .withUserConfiguration(CustomExceptionHandlerConfiguration.class) .run((context) -> assertThat(context).doesNotHaveBean(ProblemDetailsExceptionHandler.class) - .hasSingleBean(CustomExceptionResolver.class)); + .hasSingleBean(CustomExceptionHandler.class)); } private ContextConsumer assertExchangeWithSession( @@ -933,17 +933,17 @@ class WebFluxAutoConfigurationTests { } @Configuration(proxyBeanMethods = false) - static class CustomExceptionResolverConfiguration { + static class CustomExceptionHandlerConfiguration { @Bean - CustomExceptionResolver customExceptionResolver() { - return new CustomExceptionResolver(); + CustomExceptionHandler customExceptionHandler() { + return new CustomExceptionHandler(); } } @ControllerAdvice - static class CustomExceptionResolver extends ResponseEntityExceptionHandler { + static class CustomExceptionHandler extends ResponseEntityExceptionHandler { } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java index b610ca83fb..93cdcd7838 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java @@ -975,9 +975,9 @@ class WebMvcAutoConfigurationTests { @Test void problemDetailsBacksOffWhenExceptionHandler() { this.contextRunner.withPropertyValues("spring.mvc.problemdetails.enabled:true") - .withUserConfiguration(CustomExceptionResolverConfiguration.class) + .withUserConfiguration(CustomExceptionHandlerConfiguration.class) .run((context) -> assertThat(context).doesNotHaveBean(ProblemDetailsExceptionHandler.class) - .hasSingleBean(CustomExceptionResolver.class)); + .hasSingleBean(CustomExceptionHandler.class)); } private void assertResourceHttpRequestHandler(AssertableWebApplicationContext context, @@ -1507,17 +1507,17 @@ class WebMvcAutoConfigurationTests { } @Configuration(proxyBeanMethods = false) - static class CustomExceptionResolverConfiguration { + static class CustomExceptionHandlerConfiguration { @Bean - CustomExceptionResolver customExceptionResolver() { - return new CustomExceptionResolver(); + CustomExceptionHandler customExceptionHandler() { + return new CustomExceptionHandler(); } } @ControllerAdvice - static class CustomExceptionResolver extends ResponseEntityExceptionHandler { + static class CustomExceptionHandler extends ResponseEntityExceptionHandler { } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/aot/ProcessAot.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/aot/ProcessAot.java index 2b8578d062..4da1d27d45 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/aot/ProcessAot.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/aot/ProcessAot.java @@ -47,7 +47,7 @@ public abstract class ProcessAot extends AbstractAot { List args = new ArrayList<>(); args.add(getApplicationClass().get()); args.addAll(processorArgs()); - this.setArgs(args); + setArgs(args); super.exec(); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/aot/ProcessTestAot.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/aot/ProcessTestAot.java index 8e0ee8da84..3531d18e34 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/aot/ProcessTestAot.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/aot/ProcessTestAot.java @@ -70,11 +70,11 @@ public class ProcessTestAot extends AbstractAot { @TaskAction public void exec() { List args = new ArrayList<>(); - args.add(this.getClasspathRoots().getFiles().stream().filter(File::exists).map(File::getAbsolutePath) + args.add(getClasspathRoots().getFiles().stream().filter(File::exists).map(File::getAbsolutePath) .collect(Collectors.joining(File.pathSeparator))); args.addAll(processorArgs()); - this.setArgs(args); - this.classpath(this.junitPlatformLauncher); + setArgs(args); + classpath(this.junitPlatformLauncher); super.exec(); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImage.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImage.java index 7b02a85cc6..b102926269 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImage.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImage.java @@ -308,7 +308,7 @@ public abstract class BootBuildImage extends DefaultTask { } private BuildRequest customizeBuilder(BuildRequest request) { - String builder = this.getBuilder().getOrNull(); + String builder = getBuilder().getOrNull(); if (StringUtils.hasText(builder)) { return request.withBuilder(ImageReference.of(builder)); } @@ -316,7 +316,7 @@ public abstract class BootBuildImage extends DefaultTask { } private BuildRequest customizeRunImage(BuildRequest request) { - String runImage = this.getRunImage().getOrNull(); + String runImage = getRunImage().getOrNull(); if (StringUtils.hasText(runImage)) { return request.withRunImage(ImageReference.of(runImage)); } @@ -324,7 +324,7 @@ public abstract class BootBuildImage extends DefaultTask { } private BuildRequest customizeEnvironment(BuildRequest request) { - Map environment = this.getEnvironment().getOrNull(); + Map environment = getEnvironment().getOrNull(); if (environment != null && !environment.isEmpty()) { request = request.withEnv(environment); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/DockerSpec.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/DockerSpec.java index a8f97bd87a..ce3907a4db 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/DockerSpec.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/DockerSpec.java @@ -235,7 +235,7 @@ public abstract class DockerSpec { } boolean hasTokenAuth() { - return this.getToken().isPresent(); + return getToken().isPresent(); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java index 0e3900afa8..5c2e888617 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java @@ -64,7 +64,7 @@ public abstract class BootRun extends JavaExec { @Override public void exec() { - if (this.getOptimizedLaunch().get()) { + if (getOptimizedLaunch().get()) { setJvmArgs(getJvmArgs()); jvmArgs("-XX:TieredStopAtLevel=1"); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferedStartupStep.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferedStartupStep.java index 8197fbb5a4..7a997cde5b 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferedStartupStep.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferedStartupStep.java @@ -90,7 +90,7 @@ class BufferedStartupStep implements StartupStep { @Override public StartupStep tag(String key, Supplier value) { - return this.tag(key, value.get()); + return tag(key, value.get()); } @Override diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java index 569c1e6c9f..ea43e8b7b0 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java @@ -264,7 +264,7 @@ public enum PeriodStyle { } private int intValue(Period value) { - Assert.notNull(this.intValue, () -> "intValue cannot be extracted from " + this.name()); + Assert.notNull(this.intValue, () -> "intValue cannot be extracted from " + name()); return this.intValue.apply(value); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java index f21b87e392..eca86f28a7 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java @@ -88,7 +88,7 @@ public class ReactiveWebServerApplicationContext extends GenericReactiveWebAppli private void createWebServer() { WebServerManager serverManager = this.serverManager; if (serverManager == null) { - StartupStep createWebServer = this.getApplicationStartup().start("spring.boot.webserver.create"); + StartupStep createWebServer = getApplicationStartup().start("spring.boot.webserver.create"); String webServerFactoryBeanName = getWebServerFactoryBeanName(); ReactiveWebServerFactory webServerFactory = getWebServerFactory(webServerFactoryBeanName); createWebServer.tag("factory", webServerFactory.getClass().toString()); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java index d69f67280b..534237cc77 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java @@ -177,7 +177,7 @@ public class ServletWebServerApplicationContext extends GenericWebApplicationCon WebServer webServer = this.webServer; ServletContext servletContext = getServletContext(); if (webServer == null && servletContext == null) { - StartupStep createWebServer = this.getApplicationStartup().start("spring.boot.webserver.create"); + StartupStep createWebServer = getApplicationStartup().start("spring.boot.webserver.create"); ServletWebServerFactory factory = getWebServerFactory(); createWebServer.tag("factory", factory.getClass().toString()); this.webServer = factory.getWebServer(getSelfInitializer()); diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-redis/src/test/java/smoketest/session/redis/SampleSessionRedisApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-redis/src/test/java/smoketest/session/redis/SampleSessionRedisApplicationTests.java index 9926e896c8..7011506257 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-redis/src/test/java/smoketest/session/redis/SampleSessionRedisApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-redis/src/test/java/smoketest/session/redis/SampleSessionRedisApplicationTests.java @@ -69,7 +69,7 @@ public class SampleSessionRedisApplicationTests { @SuppressWarnings("unchecked") void sessionsEndpointShouldReturnUserSessions() { performLogin(); - ResponseEntity> response = this.getSessions(); + ResponseEntity> response = getSessions(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); List> sessions = (List>) response.getBody().get("sessions");