Skip to content

Commit bb26b7b

Browse files
committed
Polish
Closes gh-27431
2 parents 4a533e1 + 14e23bf commit bb26b7b

File tree

9 files changed

+10
-16
lines changed

9 files changed

+10
-16
lines changed

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ public void apply(Builder builder) {
185185
assertThat(restTemplate.getForObject(URI.create("/second/456"), String.class)).isEqualTo("OK");
186186
this.registry.get("http.client.requests").tags("uri", "/second/456").timer();
187187
this.mockServer.verify();
188-
189188
}
190189

191190
private static final class TestInterceptor implements ClientHttpRequestInterceptor {

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Mono<String> timedPercentiles() {
260260

261261
class FaultyWebFluxTagsProvider extends DefaultWebFluxTagsProvider {
262262

263-
private volatile AtomicBoolean fail = new AtomicBoolean(false);
263+
private final AtomicBoolean fail = new AtomicBoolean(false);
264264

265265
FaultyWebFluxTagsProvider() {
266266
super(true);

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/FaultyWebMvcTagsProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
class FaultyWebMvcTagsProvider extends DefaultWebMvcTagsProvider {
3333

34-
private volatile AtomicBoolean fail = new AtomicBoolean(false);
34+
private final AtomicBoolean fail = new AtomicBoolean(false);
3535

3636
FaultyWebMvcTagsProvider() {
3737
super(true);

spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/cloud.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ See the blog post on https://boxfuse.com/blog/spring-boot-ec2.html[deploying Spr
359359

360360
[[deployment.cloud.azure]]
361361
=== Azure
362-
This https://spring.io/guides/gs/spring-boot-for-azure/[Getting Started guide] walks you through deploying your Spring Boot application to either https://azure.microsoft.com/en-ca/services/spring-cloud/[Azure Spring Cloud] or https://docs.microsoft.com/en-ca/azure/app-service/overview[Azure App Service].
362+
This https://spring.io/guides/gs/spring-boot-for-azure/[Getting Started guide] walks you through deploying your Spring Boot application to either https://azure.microsoft.com/en-us/services/spring-cloud/[Azure Spring Cloud] or https://docs.microsoft.com/en-us/azure/app-service/overview[Azure App Service].
363363

364364

365365

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ public SpringApplicationBuilder(Class<?>... sources) {
9898
}
9999

100100
/**
101-
* Creates a new {@link org.springframework.boot.SpringApplication} instances from the
102-
* given sources. Subclasses may override in order to provide a custom subclass of
103-
* {@link org.springframework.boot.SpringApplication}
101+
* Creates a new {@link SpringApplication} instance from the given sources. Subclasses
102+
* may override in order to provide a custom subclass of {@link SpringApplication}.
104103
* @param sources the sources
105104
* @return the {@link org.springframework.boot.SpringApplication} instance
106105
* @since 1.1.0

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public T build() {
174174
Set<DataSourceProperty> applied = new HashSet<>();
175175
for (DataSourceProperty property : DataSourceProperty.values()) {
176176
String value = this.values.get(property);
177-
if (!this.values.containsKey(property) && deriveFromProperties != null && properties.canSet(property)) {
177+
if (value == null && deriveFromProperties != null && properties.canSet(property)) {
178178
value = deriveFromProperties.get(this.deriveFrom, property);
179179
}
180180
if (value != null) {
@@ -262,7 +262,7 @@ private enum DataSourceProperty {
262262

263263
PASSWORD(false, "password");
264264

265-
private boolean optional;
265+
private final boolean optional;
266266

267267
private final String[] names;
268268

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/RandomValuePropertySourceTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void longRangeWhenLowerBoundEqualsUpperBoundShouldFailWithIllegalArgumentExcepti
123123
}
124124

125125
@Test
126-
void longRangeWhenLowerBoundNegativeShouldFailWithIllegalArgumentException() {
126+
void longRangeWhenLowerBoundNegative() {
127127
Long value = (Long) this.source.getProperty("random.long[-4,4]");
128128
assertThat(value >= -4).isTrue();
129129
assertThat(value < 4).isTrue();

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty10/src/test/java/smoketest/jetty10/Jetty10Http2OverTlsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
4949
properties = { "server.http2.enabled=true", "server.ssl.enabled=true",
5050
"server.ssl.keystore=classpath:sample.jks", "server.ssl.key-store-password=secret",
51-
"server.ssl.key-password=password", "logging.level.org.eclipse.jetty=debug" })
52-
public class Jetty10Http2OverTlsTests {
51+
"server.ssl.key-password=password" })
52+
class Jetty10Http2OverTlsTests {
5353

5454
@LocalServerPort
5555
private int port;

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-secure-webflux/src/test/java/smoketest/secure/webflux/CorsSampleActuatorApplicationTests.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import org.springframework.beans.factory.annotation.Autowired;
2222
import org.springframework.boot.test.context.SpringBootTest;
23-
import org.springframework.context.ApplicationContext;
2423
import org.springframework.test.context.ActiveProfiles;
2524
import org.springframework.test.web.reactive.server.WebTestClient;
2625

@@ -36,9 +35,6 @@ class CorsSampleActuatorApplicationTests {
3635
@Autowired
3736
private WebTestClient webClient;
3837

39-
@Autowired
40-
private ApplicationContext applicationContext;
41-
4238
@Test
4339
void endpointShouldReturnUnauthorized() {
4440
this.webClient.get().uri("/actuator/env").exchange().expectStatus().isUnauthorized();

0 commit comments

Comments
 (0)