diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java index 00c88bbe8a..697f2a133a 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java @@ -185,7 +185,6 @@ class MetricsRestTemplateCustomizerTests { assertThat(restTemplate.getForObject(URI.create("/second/456"), String.class)).isEqualTo("OK"); this.registry.get("http.client.requests").tags("uri", "/second/456").timer(); this.mockServer.verify(); - } private static final class TestInterceptor implements ClientHttpRequestInterceptor { diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java index c6c7a5195b..15232266c5 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java @@ -142,7 +142,7 @@ class MetricsWebFilterTests { class FaultyWebFluxTagsProvider extends DefaultWebFluxTagsProvider { - private volatile AtomicBoolean fail = new AtomicBoolean(false); + private final AtomicBoolean fail = new AtomicBoolean(false); FaultyWebFluxTagsProvider() { super(true); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/FaultyWebMvcTagsProvider.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/FaultyWebMvcTagsProvider.java index 111082fdf1..57701d2713 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/FaultyWebMvcTagsProvider.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/FaultyWebMvcTagsProvider.java @@ -31,7 +31,7 @@ import io.micrometer.core.instrument.Tag; */ class FaultyWebMvcTagsProvider extends DefaultWebMvcTagsProvider { - private volatile AtomicBoolean fail = new AtomicBoolean(false); + private final AtomicBoolean fail = new AtomicBoolean(false); FaultyWebMvcTagsProvider() { super(true); 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 ad8ac8bc08..adae2bed9f 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 @@ -100,7 +100,7 @@ public class SpringApplicationBuilder { /** * Creates a new {@link org.springframework.boot.SpringApplication} instances from the * given sources. Subclasses may override in order to provide a custom subclass of - * {@link org.springframework.boot.SpringApplication} + * {@link org.springframework.boot.SpringApplication}. * @param sources the sources * @return the {@link org.springframework.boot.SpringApplication} instance * @since 1.1.0 diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/RandomValuePropertySourceTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/RandomValuePropertySourceTests.java index eedec91d7b..9df913875c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/RandomValuePropertySourceTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/RandomValuePropertySourceTests.java @@ -123,7 +123,7 @@ class RandomValuePropertySourceTests { } @Test - void longRangeWhenLowerBoundNegativeShouldFailWithIllegalArgumentException() { + void longRangeWhenLowerBoundNegative() { Long value = (Long) this.source.getProperty("random.long[-4,4]"); assertThat(value >= -4).isTrue(); assertThat(value < 4).isTrue(); diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-secure-webflux/src/test/java/smoketest/secure/webflux/CorsSampleActuatorApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-secure-webflux/src/test/java/smoketest/secure/webflux/CorsSampleActuatorApplicationTests.java index cddc4b53e4..880413cd52 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-secure-webflux/src/test/java/smoketest/secure/webflux/CorsSampleActuatorApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-secure-webflux/src/test/java/smoketest/secure/webflux/CorsSampleActuatorApplicationTests.java @@ -20,7 +20,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.ApplicationContext; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.web.reactive.server.WebTestClient; @@ -36,9 +35,6 @@ class CorsSampleActuatorApplicationTests { @Autowired private WebTestClient webClient; - @Autowired - private ApplicationContext applicationContext; - @Test void endpointShouldReturnUnauthorized() { this.webClient.get().uri("/actuator/env").exchange().expectStatus().isUnauthorized();