Browse Source

Polish

Closes gh-27431
pull/28375/head
Andy Wilkinson 4 years ago
parent
commit
bb26b7bdf5
  1. 1
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java
  2. 2
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java
  3. 2
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/FaultyWebMvcTagsProvider.java
  4. 2
      spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/cloud.adoc
  5. 5
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java
  6. 4
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java
  7. 2
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/RandomValuePropertySourceTests.java
  8. 4
      spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty10/src/test/java/smoketest/jetty10/Jetty10Http2OverTlsTests.java
  9. 4
      spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-secure-webflux/src/test/java/smoketest/secure/webflux/CorsSampleActuatorApplicationTests.java

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

@ -185,7 +185,6 @@ class MetricsRestTemplateCustomizerTests { @@ -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 {

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

@ -260,7 +260,7 @@ class MetricsWebFilterTests { @@ -260,7 +260,7 @@ class MetricsWebFilterTests {
class FaultyWebFluxTagsProvider extends DefaultWebFluxTagsProvider {
private volatile AtomicBoolean fail = new AtomicBoolean(false);
private final AtomicBoolean fail = new AtomicBoolean(false);
FaultyWebFluxTagsProvider() {
super(true);

2
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; @@ -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);

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

@ -359,7 +359,7 @@ See the blog post on https://boxfuse.com/blog/spring-boot-ec2.html[deploying Spr @@ -359,7 +359,7 @@ See the blog post on https://boxfuse.com/blog/spring-boot-ec2.html[deploying Spr
[[deployment.cloud.azure]]
=== Azure
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].
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].

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

@ -98,9 +98,8 @@ public class SpringApplicationBuilder { @@ -98,9 +98,8 @@ 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}
* Creates a new {@link SpringApplication} instance from the given sources. Subclasses
* may override in order to provide a custom subclass of {@link SpringApplication}.
* @param sources the sources
* @return the {@link org.springframework.boot.SpringApplication} instance
* @since 1.1.0

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

@ -174,7 +174,7 @@ public final class DataSourceBuilder<T extends DataSource> { @@ -174,7 +174,7 @@ public final class DataSourceBuilder<T extends DataSource> {
Set<DataSourceProperty> applied = new HashSet<>();
for (DataSourceProperty property : DataSourceProperty.values()) {
String value = this.values.get(property);
if (!this.values.containsKey(property) && deriveFromProperties != null && properties.canSet(property)) {
if (value == null && deriveFromProperties != null && properties.canSet(property)) {
value = deriveFromProperties.get(this.deriveFrom, property);
}
if (value != null) {
@ -262,7 +262,7 @@ public final class DataSourceBuilder<T extends DataSource> { @@ -262,7 +262,7 @@ public final class DataSourceBuilder<T extends DataSource> {
PASSWORD(false, "password");
private boolean optional;
private final boolean optional;
private final String[] names;

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

@ -123,7 +123,7 @@ class RandomValuePropertySourceTests { @@ -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();

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

@ -48,8 +48,8 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -48,8 +48,8 @@ import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
properties = { "server.http2.enabled=true", "server.ssl.enabled=true",
"server.ssl.keystore=classpath:sample.jks", "server.ssl.key-store-password=secret",
"server.ssl.key-password=password", "logging.level.org.eclipse.jetty=debug" })
public class Jetty10Http2OverTlsTests {
"server.ssl.key-password=password" })
class Jetty10Http2OverTlsTests {
@LocalServerPort
private int port;

4
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; @@ -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 { @@ -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();

Loading…
Cancel
Save