Browse Source

Polish

See gh-21009
pull/21130/head
dreis2211 6 years ago committed by Stephane Nicoll
parent
commit
5eb5bf0a2d
  1. 2
      buildSrc/src/main/java/org/springframework/boot/build/optional/OptionalDependenciesPlugin.java
  2. 2
      buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/DependencyVersionTests.java
  3. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesAutoConfigurationTests.java
  4. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesHealthEndpointGroupTests.java
  5. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesHealthEndpointGroupsTests.java
  6. 4
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityServiceTests.java
  7. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/AutoConfiguredHealthEndpointGroupsTests.java
  8. 4
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/HealthIndicatorRegistryInjectionIntegrationTests.java
  9. 4
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultContributorRegistryTests.java
  10. 4
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java
  11. 2
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java
  12. 8
      spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java
  13. 2
      spring-boot-project/spring-boot-docs/src/docs/asciidoc/appendix-executable-jar-format.adoc
  14. 2
      spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc
  15. 2
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/system/OutputCaptureTests.java
  16. 6
      spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/LifecycleTests.java
  17. 2
      spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java
  18. 2
      spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/ProgressUpdateEventTests.java
  19. 4
      spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/HttpClientTransportTests.java
  20. 4
      spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/type/ImageConfigTests.java
  21. 4
      spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/type/ImageTests.java
  22. 2
      spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootJarTests.java
  23. 2
      spring-boot-project/spring-boot-tools/spring-boot-jarmode-layertools/src/test/java/org/springframework/boot/jarmode/layertools/LayerToolsJarModeTests.java
  24. 6
      spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/CentralDirectoryEndRecord.java
  25. 2
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/JarIntegrationTests.java
  26. 18
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ImageTests.java
  27. 4
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ansi/Ansi8BitColorTests.java
  28. 2
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/event/EventPublishingRunListenerTests.java
  29. 6
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanRegistrarTests.java
  30. 8
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConversionServiceDeducerTests.java
  31. 4
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/security/servlet/ApplicationContextRequestMatcherTests.java
  32. 2
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactoryTests.java
  33. 2
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java
  34. 8
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/CompressionTests.java
  35. 8
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/WebServletHandlerTests.java

2
buildSrc/src/main/java/org/springframework/boot/build/optional/OptionalDependenciesPlugin.java

@ -58,7 +58,7 @@ public class OptionalDependenciesPlugin implements Plugin<Project> { @@ -58,7 +58,7 @@ public class OptionalDependenciesPlugin implements Plugin<Project> {
.all((javadoc) -> javadoc.setClasspath(javadoc.getClasspath().plus(optional)));
});
project.getPlugins().withType(EclipsePlugin.class,
(eclipePlugin) -> project.getExtensions().getByType(EclipseModel.class)
(eclipsePlugin) -> project.getExtensions().getByType(EclipseModel.class)
.classpath((classpath) -> classpath.getPlusConfigurations().add(optional)));
}

2
buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/DependencyVersionTests.java

@ -38,7 +38,7 @@ public class DependencyVersionTests { @@ -38,7 +38,7 @@ public class DependencyVersionTests {
}
@Test
void parseWhenMavenLikeVersionWithNumericQualifieShouldReturnNumericQualifierDependencyVersion() {
void parseWhenMavenLikeVersionWithNumericQualifierShouldReturnNumericQualifierDependencyVersion() {
assertThat(DependencyVersion.parse("1.2.3.4")).isInstanceOf(NumericQualifierDependencyVersion.class);
}

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesAutoConfigurationTests.java

@ -64,7 +64,7 @@ class AvailabilityProbesAutoConfigurationTests { @@ -64,7 +64,7 @@ class AvailabilityProbesAutoConfigurationTests {
}
@Test
void probesWhenKuberntesAndPropertyDisabledAddsNotBeans() {
void probesWhenKubernetesAndPropertyDisabledAddsNotBeans() {
this.contextRunner
.withPropertyValues("spring.main.cloud-platform=kubernetes", "management.health.probes.enabled=false")
.run((context) -> assertThat(context).hasSingleBean(ApplicationAvailability.class)

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesHealthEndpointGroupTests.java

@ -56,7 +56,7 @@ class AvailabilityProbesHealthEndpointGroupTests { @@ -56,7 +56,7 @@ class AvailabilityProbesHealthEndpointGroupTests {
}
@Test
void getStatusAggregattorReturnsDefaultStatusAggregator() {
void getStatusAggregatorReturnsDefaultStatusAggregator() {
assertThat(this.group.getStatusAggregator()).isEqualTo(StatusAggregator.DEFAULT);
}

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/availability/AvailabilityProbesHealthEndpointGroupsTests.java

@ -96,7 +96,7 @@ class AvailabilityProbesHealthEndpointGroupsTests { @@ -96,7 +96,7 @@ class AvailabilityProbesHealthEndpointGroupsTests {
}
@Test
void getRedinessProbeHasOnlyReadinessStateAsMember() {
void getReadinessProbeHasOnlyReadinessStateAsMember() {
HealthEndpointGroups availabilityProbes = new AvailabilityProbesHealthEndpointGroups(this.delegate);
HealthEndpointGroup probeGroup = availabilityProbes.get("readiness");
assertThat(probeGroup.isMember("livenessState")).isFalse();

4
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityServiceTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -76,7 +76,7 @@ class CloudFoundrySecurityServiceTests { @@ -76,7 +76,7 @@ class CloudFoundrySecurityServiceTests {
}
@Test
void doNotskipSslValidationWhenFalse() {
void doNotSkipSslValidationWhenFalse() {
RestTemplateBuilder builder = new RestTemplateBuilder();
this.securityService = new CloudFoundrySecurityService(builder, CLOUD_CONTROLLER, false);
RestTemplate restTemplate = (RestTemplate) ReflectionTestUtils.getField(this.securityService, "restTemplate");

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/AutoConfiguredHealthEndpointGroupsTests.java

@ -103,7 +103,7 @@ class AutoConfiguredHealthEndpointGroupsTests { @@ -103,7 +103,7 @@ class AutoConfiguredHealthEndpointGroupsTests {
}
@Test
void createWhenHasStatusAggregatorBeanReturnsInstanceWithAgregatorUsedForAllGroups() {
void createWhenHasStatusAggregatorBeanReturnsInstanceWithAggregatorUsedForAllGroups() {
this.contextRunner.withUserConfiguration(CustomStatusAggregatorConfiguration.class)
.withPropertyValues("management.endpoint.health.status.order=up,down",
"management.endpoint.health.group.a.include=*")

4
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/HealthIndicatorRegistryInjectionIntegrationTests.java

@ -61,12 +61,12 @@ public class HealthIndicatorRegistryInjectionIntegrationTests { @@ -61,12 +61,12 @@ public class HealthIndicatorRegistryInjectionIntegrationTests {
MeterRegistry registry) {
CompositeHealthIndicator healthIndicator = new CompositeHealthIndicator(healthAggregator,
healthIndicatorRegistry);
Gauge.builder("health", healthIndicator, this::getGuageValue)
Gauge.builder("health", healthIndicator, this::getGaugeValue)
.description("Spring boot health indicator. 3=UP, 2=OUT_OF_SERVICE, 1=DOWN, 0=UNKNOWN")
.strongReference(true).register(registry);
}
private double getGuageValue(CompositeHealthIndicator health) {
private double getGaugeValue(CompositeHealthIndicator health) {
Status status = health.health().getStatus();
switch (status.getCode()) {
case "UP":

4
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultContributorRegistryTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -90,7 +90,7 @@ abstract class DefaultContributorRegistryTests { @@ -90,7 +90,7 @@ abstract class DefaultContributorRegistryTests {
}
@Test
void registerContributorRegisteresContributors() {
void registerContributorRegistersContributors() {
this.registry.registerContributor("one", this.one);
this.registry.registerContributor("two", this.two);
assertThat(this.registry).hasSize(2);

4
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -396,7 +396,7 @@ class HibernateJpaAutoConfigurationTests extends AbstractJpaAutoConfigurationTes @@ -396,7 +396,7 @@ class HibernateJpaAutoConfigurationTests extends AbstractJpaAutoConfigurationTes
}
@Test
void whenLocalContanerEntityManagerFactoryBeanHasNoJpaVendorAdapterAutoConfigurationSucceeds() {
void whenLocalContainerEntityManagerFactoryBeanHasNoJpaVendorAdapterAutoConfigurationSucceeds() {
contextRunner()
.withUserConfiguration(
TestConfigurationWithLocalContainerEntityManagerFactoryBeanWithNoJpaVendorAdapter.class)

2
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java

@ -468,7 +468,7 @@ class TomcatWebServerFactoryCustomizerTests { @@ -468,7 +468,7 @@ class TomcatWebServerFactoryCustomizerTests {
}
@Test
void accessLogwithIpv6CanonicalSet() {
void accessLogWithIpv6CanonicalSet() {
bind("server.tomcat.accesslog.enabled=true", "server.tomcat.accesslog.ipv6-canonical=true");
TomcatServletWebServerFactory factory = customizeAndGetFactory();
assertThat(((AccessLogValve) factory.getEngineValves().iterator().next()).getIpv6Canonical()).isTrue();

8
spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java

@ -50,7 +50,7 @@ class AetherGrapeEngineTests { @@ -50,7 +50,7 @@ class AetherGrapeEngineTests {
private final RepositoryConfiguration springMilestone = new RepositoryConfiguration("spring-milestone",
URI.create("https://repo.spring.io/milestone"), false);
private final RepositoryConfiguration springSnaphot = new RepositoryConfiguration("spring-snapshot",
private final RepositoryConfiguration springSnapshot = new RepositoryConfiguration("spring-snapshot",
URI.create("https://repo.spring.io/snapshot"), true);
private AetherGrapeEngine createGrapeEngine(RepositoryConfiguration... additionalRepositories) {
@ -67,7 +67,7 @@ class AetherGrapeEngineTests { @@ -67,7 +67,7 @@ class AetherGrapeEngineTests {
@Test
void dependencyResolution() {
Map<String, Object> args = new HashMap<>();
createGrapeEngine(this.springMilestone, this.springSnaphot).grab(args,
createGrapeEngine(this.springMilestone, this.springSnapshot).grab(args,
createDependency("org.springframework", "spring-jdbc", null));
assertThat(this.groovyClassLoader.getURLs()).hasSize(5);
}
@ -107,7 +107,7 @@ class AetherGrapeEngineTests { @@ -107,7 +107,7 @@ class AetherGrapeEngineTests {
Map<String, Object> args = new HashMap<>();
args.put("excludes", Arrays.asList(createExclusion("org.springframework", "spring-core")));
createGrapeEngine(this.springMilestone, this.springSnaphot).grab(args,
createGrapeEngine(this.springMilestone, this.springSnapshot).grab(args,
createDependency("org.springframework", "spring-jdbc", "3.2.4.RELEASE"),
createDependency("org.springframework", "spring-beans", "3.2.4.RELEASE"));
@ -129,7 +129,7 @@ class AetherGrapeEngineTests { @@ -129,7 +129,7 @@ class AetherGrapeEngineTests {
GroovyClassLoader customClassLoader = new GroovyClassLoader();
args.put("classLoader", customClassLoader);
createGrapeEngine(this.springMilestone, this.springSnaphot).grab(args,
createGrapeEngine(this.springMilestone, this.springSnapshot).grab(args,
createDependency("org.springframework", "spring-jdbc", null));
assertThat(this.groovyClassLoader.getURLs()).isEmpty();

2
spring-boot-project/spring-boot-docs/src/docs/asciidoc/appendix-executable-jar-format.adoc

@ -93,7 +93,7 @@ Spring Boot Loader-compatible jar and war archives can include additional index @@ -93,7 +93,7 @@ Spring Boot Loader-compatible jar and war archives can include additional index
A `classpath.idx` file can be provided for both jars and wars, it provides the ordering that jars should be added to the classpath.
The `layers.idx` file can be used only for jars, it allows a jar to be split into logical layers for Docker/OCI image creation.
Index files follow a YAML compatible syntax so that they can be eaily parsed by third-party tools.
Index files follow a YAML compatible syntax so that they can be easily parsed by third-party tools.
These files, however, are _not_ parsed internally as YAML and they must be written in exactly the formats described below in order to be used.

2
spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc

@ -93,7 +93,7 @@ If a misconfigured bean is initialized lazily, a failure will no longer occur du @@ -93,7 +93,7 @@ If a misconfigured bean is initialized lazily, a failure will no longer occur du
Care must also be taken to ensure that the JVM has sufficient memory to accommodate all of the application's beans and not just those that are initialized during startup.
For these reasons, lazy initialization is not enabled by default and it is recommended that fine-tuning of the JVM's heap size is done before enabling lazy initialization.
Lazy initialization can be enabled programatically using the `lazyInitialization` method on `SpringApplicationBuilder` or the `setLazyInitialization` method on `SpringApplication`.
Lazy initialization can be enabled programmatically using the `lazyInitialization` method on `SpringApplicationBuilder` or the `setLazyInitialization` method on `SpringApplication`.
Alternatively, it can be enabled using the configprop:spring.main.lazy-initialization[] property as shown in the following example:
[source,properties,indent=0,configprops]

2
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/system/OutputCaptureTests.java

@ -69,7 +69,7 @@ class OutputCaptureTests { @@ -69,7 +69,7 @@ class OutputCaptureTests {
}
@Test
void pushWhenHasExistingStartesNewCapture() {
void pushWhenHasExistingStartsNewCapture() {
System.out.print("A");
this.output.push();
System.out.print("B");

6
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/LifecycleTests.java

@ -102,7 +102,7 @@ class LifecycleTests { @@ -102,7 +102,7 @@ class LifecycleTests {
}
@Test
void executeWhenAleadyRunThrowsException() throws Exception {
void executeWhenAlreadyRunThrowsException() throws Exception {
given(this.docker.container().create(any())).willAnswer(answerWithGeneratedContainerId());
given(this.docker.container().create(any(), any())).willAnswer(answerWithGeneratedContainerId());
given(this.docker.container().wait(any())).willReturn(ContainerStatus.of(0, null));
@ -211,9 +211,9 @@ class LifecycleTests { @@ -211,9 +211,9 @@ class LifecycleTests {
static class TestLifecycle extends Lifecycle {
TestLifecycle(BuildLog log, DockerApi docker, BuildRequest request, ImageReference runImageReferece,
TestLifecycle(BuildLog log, DockerApi docker, BuildRequest request, ImageReference runImageReference,
EphemeralBuilder builder) {
super(log, docker, request, runImageReferece, builder);
super(log, docker, request, runImageReference, builder);
}
@Override

2
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java

@ -190,7 +190,7 @@ class DockerApiTests { @@ -190,7 +190,7 @@ class DockerApiTests {
}
@Test
void removeWhenReferenceIsNulllThrowsException() {
void removeWhenReferenceIsNullThrowsException() {
assertThatIllegalArgumentException().isThrownBy(() -> this.api.remove(null, true))
.withMessage("Reference must not be null");
}

2
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/ProgressUpdateEventTests.java

@ -36,7 +36,7 @@ abstract class ProgressUpdateEventTests { @@ -36,7 +36,7 @@ abstract class ProgressUpdateEventTests {
}
@Test
void getProgressDetailsReturnsProgresssDetails() {
void getProgressDetailsReturnsProgressDetails() {
ProgressUpdateEvent event = createEvent();
assertThat(event.getProgressDetail().getCurrent()).isEqualTo(1);
assertThat(event.getProgressDetail().getTotal()).isEqualTo(2);

4
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/HttpClientTransportTests.java

@ -177,7 +177,7 @@ class HttpClientTransportTests { @@ -177,7 +177,7 @@ class HttpClientTransportTests {
}
@Test
void executeWhenResposeIsIn400RangeShouldThrowDockerException() throws IOException {
void executeWhenResponseIsIn400RangeShouldThrowDockerException() throws IOException {
given(this.entity.getContent()).willReturn(getClass().getResourceAsStream("errors.json"));
given(this.statusLine.getStatusCode()).willReturn(404);
assertThatExceptionOfType(DockerEngineException.class).isThrownBy(() -> this.http.get(this.uri))
@ -185,7 +185,7 @@ class HttpClientTransportTests { @@ -185,7 +185,7 @@ class HttpClientTransportTests {
}
@Test
void executeWhenResposeIsIn500RangeShouldThrowDockerException() {
void executeWhenResponseIsIn500RangeShouldThrowDockerException() {
given(this.statusLine.getStatusCode()).willReturn(500);
assertThatExceptionOfType(DockerEngineException.class).isThrownBy(() -> this.http.get(this.uri))
.satisfies((ex) -> assertThat(ex.getErrors()).isNull());

4
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/type/ImageConfigTests.java

@ -45,8 +45,8 @@ class ImageConfigTests extends AbstractJsonTests { @@ -45,8 +45,8 @@ class ImageConfigTests extends AbstractJsonTests {
@Test
void getLabelsReturnsLabels() throws Exception {
ImageConfig imageConfig = getImageConfig();
Map<String, String> lables = imageConfig.getLabels();
assertThat(lables).hasSize(4).contains(entry("io.buildpacks.stack.id", "org.cloudfoundry.stacks.cflinuxfs3"));
Map<String, String> labels = imageConfig.getLabels();
assertThat(labels).hasSize(4).contains(entry("io.buildpacks.stack.id", "org.cloudfoundry.stacks.cflinuxfs3"));
}
@Test

4
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/type/ImageTests.java

@ -46,8 +46,8 @@ class ImageTests extends AbstractJsonTests { @@ -46,8 +46,8 @@ class ImageTests extends AbstractJsonTests {
@Test
void getConfigLabelsReturnsLabels() throws Exception {
Image image = getImage();
Map<String, String> lables = image.getConfig().getLabels();
assertThat(lables).contains(entry("io.buildpacks.stack.id", "org.cloudfoundry.stacks.cflinuxfs3"));
Map<String, String> labels = image.getConfig().getLabels();
assertThat(labels).contains(entry("io.buildpacks.stack.id", "org.cloudfoundry.stacks.cflinuxfs3"));
}
@Test

2
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootJarTests.java

@ -129,7 +129,7 @@ class BootJarTests extends AbstractBootArchiveTests<TestBootJar> { @@ -129,7 +129,7 @@ class BootJarTests extends AbstractBootArchiveTests<TestBootJar> {
}
@Test
void whenJarIsLayeredWithCustomStrategiesThenLayersIndexIsPresentAndCorrent() throws IOException {
void whenJarIsLayeredWithCustomStrategiesThenLayersIndexIsPresentAndCorrect() throws IOException {
File jar = createLayeredJar((layered) -> {
layered.application((application) -> {
application.intoLayer("resources", (spec) -> spec.include("static/**"));

2
spring-boot-project/spring-boot-tools/spring-boot-jarmode-layertools/src/test/java/org/springframework/boot/jarmode/layertools/LayerToolsJarModeTests.java

@ -68,7 +68,7 @@ class LayerToolsJarModeTests { @@ -68,7 +68,7 @@ class LayerToolsJarModeTests {
}
@Test
void mainWithNoParamersShowsHelp() {
void mainWithNoParametersShowsHelp() {
new LayerToolsJarMode().run("layertools", NO_ARGS);
assertThat(this.out).hasSameContentAsResource("help-output.txt");
}

6
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/CentralDirectoryEndRecord.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -167,8 +167,8 @@ class CentralDirectoryEndRecord { @@ -167,8 +167,8 @@ class CentralDirectoryEndRecord {
private int numberOfRecords;
private Zip64End(RandomAccessData data, int centratDirectoryEndOffset) throws IOException {
this(data, new Zip64Locator(data, centratDirectoryEndOffset));
private Zip64End(RandomAccessData data, int centralDirectoryEndOffset) throws IOException {
this(data, new Zip64Locator(data, centralDirectoryEndOffset));
}
private Zip64End(RandomAccessData data, Zip64Locator locator) throws IOException {

2
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/JarIntegrationTests.java

@ -238,7 +238,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests { @@ -238,7 +238,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
}
@TestTemplate
void whenADependendencyHasTestScopeItIsNotIncludedInTheRepackagedJar(MavenBuild mavenBuild) {
void whenADependencyHasTestScopeItIsNotIncludedInTheRepackagedJar(MavenBuild mavenBuild) {
mavenBuild.project("jar-test-scope").execute((project) -> {
File main = new File(project, "target/jar-test-scope-0.0.1.BUILD-SNAPSHOT.jar");
assertThat(jar(main)).doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/log4j")

18
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ImageTests.java

@ -41,21 +41,21 @@ class ImageTests { @@ -41,21 +41,21 @@ class ImageTests {
@Test
void getBuildRequestWhenNameIsNullDeducesName() {
BuildRequest request = new Image().getBuildRequest(createArtifact(), mockAplicationContent());
BuildRequest request = new Image().getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getName().toString()).isEqualTo("docker.io/library/my-app:0.0.1-SNAPSHOT");
}
@Test
void getBuildEquestWhenNameIsSetUsesName() {
void getBuildRequestWhenNameIsSetUsesName() {
Image image = new Image();
image.name = "demo";
BuildRequest request = image.getBuildRequest(createArtifact(), mockAplicationContent());
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getName().toString()).isEqualTo("docker.io/library/demo:latest");
}
@Test
void getBuildRequestWhenNoCustomizationsUsesDefaults() {
BuildRequest request = new Image().getBuildRequest(createArtifact(), mockAplicationContent());
BuildRequest request = new Image().getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getName().toString()).isEqualTo("docker.io/library/my-app:0.0.1-SNAPSHOT");
assertThat(request.getBuilder().toString()).contains("docker.io/cloudfoundry/cnb:bionic-platform-api");
assertThat(request.getEnv()).isEmpty();
@ -67,7 +67,7 @@ class ImageTests { @@ -67,7 +67,7 @@ class ImageTests {
void getBuildRequestWhenHasBuilderUsesBuilder() {
Image image = new Image();
image.builder = "springboot/builder:2.2.x";
BuildRequest request = image.getBuildRequest(createArtifact(), mockAplicationContent());
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getBuilder().toString()).isEqualTo("docker.io/springboot/builder:2.2.x");
}
@ -75,7 +75,7 @@ class ImageTests { @@ -75,7 +75,7 @@ class ImageTests {
void getBuildRequestWhenHasEnvUsesEnv() {
Image image = new Image();
image.env = Collections.singletonMap("test", "test");
BuildRequest request = image.getBuildRequest(createArtifact(), mockAplicationContent());
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getEnv()).containsExactly(entry("test", "test"));
}
@ -83,7 +83,7 @@ class ImageTests { @@ -83,7 +83,7 @@ class ImageTests {
void getBuildRequestWhenHasCleanCacheUsesCleanCache() {
Image image = new Image();
image.cleanCache = true;
BuildRequest request = image.getBuildRequest(createArtifact(), mockAplicationContent());
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.isCleanCache()).isTrue();
}
@ -91,7 +91,7 @@ class ImageTests { @@ -91,7 +91,7 @@ class ImageTests {
void getBuildRequestWhenHasVerboseLoggingUsesVerboseLogging() {
Image image = new Image();
image.verboseLogging = true;
BuildRequest request = image.getBuildRequest(createArtifact(), mockAplicationContent());
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.isVerboseLogging()).isTrue();
}
@ -100,7 +100,7 @@ class ImageTests { @@ -100,7 +100,7 @@ class ImageTests {
"jar", null, new DefaultArtifactHandler());
}
private Function<Owner, TarArchive> mockAplicationContent() {
private Function<Owner, TarArchive> mockApplicationContent() {
return (owner) -> null;
}

4
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ansi/Ansi8BitColorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -40,7 +40,7 @@ class Ansi8BitColorTests { @@ -40,7 +40,7 @@ class Ansi8BitColorTests {
}
@Test
void forgroundWhenOutsideBoundsThrowsException() {
void foregroundWhenOutsideBoundsThrowsException() {
assertThatIllegalArgumentException().isThrownBy(() -> Ansi8BitColor.foreground(-1))
.withMessage("Code must be between 0 and 255");
assertThatIllegalArgumentException().isThrownBy(() -> Ansi8BitColor.foreground(256))

2
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/event/EventPublishingRunListenerTests.java

@ -57,7 +57,7 @@ class EventPublishingRunListenerTests { @@ -57,7 +57,7 @@ class EventPublishingRunListenerTests {
}
@Test
void shouldPublishLifecyleEvents() {
void shouldPublishLifecycleEvents() {
StaticApplicationContext context = new StaticApplicationContext();
assertThat(this.eventListener.receivedEvents()).isEmpty();
this.runListener.starting();

6
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanRegistrarTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -44,7 +44,7 @@ class ConfigurationPropertiesScanRegistrarTests { @@ -44,7 +44,7 @@ class ConfigurationPropertiesScanRegistrarTests {
new MockEnvironment(), null);
@Test
void registerBeanDefintionsShouldScanForConfigurationProperties() throws IOException {
void registerBeanDefinitionsShouldScanForConfigurationProperties() throws IOException {
this.registrar.registerBeanDefinitions(getAnnotationMetadata(ConfigurationPropertiesScanConfiguration.class),
this.beanFactory);
BeanDefinition bingDefinition = this.beanFactory.getBeanDefinition(
@ -70,7 +70,7 @@ class ConfigurationPropertiesScanRegistrarTests { @@ -70,7 +70,7 @@ class ConfigurationPropertiesScanRegistrarTests {
}
@Test
void scanWhenBasePackagesAndBasePackcageClassesProvidedShouldUseThat() throws IOException {
void scanWhenBasePackagesAndBasePackageClassesProvidedShouldUseThat() throws IOException {
DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
beanFactory.setAllowBeanDefinitionOverriding(false);
this.registrar.registerBeanDefinitions(

8
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConversionServiceDeducerTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -84,8 +84,8 @@ class ConversionServiceDeducerTests { @@ -84,8 +84,8 @@ class ConversionServiceDeducerTests {
@Bean
@ConfigurationPropertiesBinding
TestConveter testConveter() {
return new TestConveter();
TestConverter testConverter() {
return new TestConverter();
}
}
@ -94,7 +94,7 @@ class ConversionServiceDeducerTests { @@ -94,7 +94,7 @@ class ConversionServiceDeducerTests {
}
private static class TestConveter implements Converter<InputStream, OutputStream> {
private static class TestConverter implements Converter<InputStream, OutputStream> {
@Override
public OutputStream convert(InputStream source) {

4
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/security/servlet/ApplicationContextRequestMatcherTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -75,7 +75,7 @@ class ApplicationContextRequestMatcherTests { @@ -75,7 +75,7 @@ class ApplicationContextRequestMatcherTests {
}
@Test // gh-18012
void machesWhenCalledWithDifferentApplicationContextDoesNotCache() {
void matchesWhenCalledWithDifferentApplicationContextDoesNotCache() {
StaticWebApplicationContext context1 = createWebApplicationContext();
StaticWebApplicationContext context2 = createWebApplicationContext();
TestApplicationContextRequestMatcher<ApplicationContext> matcher = new TestApplicationContextRequestMatcher<>(

2
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactoryTests.java

@ -117,7 +117,7 @@ class JettyServletWebServerFactoryTests extends AbstractJettyServletWebServerFac @@ -117,7 +117,7 @@ class JettyServletWebServerFactoryTests extends AbstractJettyServletWebServerFac
}
@Test
void sessionTimeoutInMins() {
void sessionTimeoutInMinutes() {
JettyServletWebServerFactory factory = getFactory();
factory.getSession().setTimeout(Duration.ofMinutes(1));
assertTimeout(factory, 60);

2
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java

@ -247,7 +247,7 @@ class TomcatServletWebServerFactoryTests extends AbstractServletWebServerFactory @@ -247,7 +247,7 @@ class TomcatServletWebServerFactoryTests extends AbstractServletWebServerFactory
}
@Test
void sessionTimeoutInMins() {
void sessionTimeoutInMinutes() {
TomcatServletWebServerFactory factory = getFactory();
factory.getSession().setTimeout(Duration.ofMinutes(1));
assertTimeout(factory, 1);

8
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/CompressionTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -29,11 +29,11 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -29,11 +29,11 @@ import static org.assertj.core.api.Assertions.assertThat;
class CompressionTests {
@Test
void defaultCompressableMimeTypesMatchesTomcatsDefault() {
assertThat(new Compression().getMimeTypes()).containsExactlyInAnyOrder(getTomcatDefaultCompressableMimeTypes());
void defaultCompressibleMimeTypesMatchesTomcatsDefault() {
assertThat(new Compression().getMimeTypes()).containsExactlyInAnyOrder(getTomcatDefaultCompressibleMimeTypes());
}
private String[] getTomcatDefaultCompressableMimeTypes() {
private String[] getTomcatDefaultCompressibleMimeTypes() {
Http11NioProtocol protocol = new Http11NioProtocol();
return protocol.getCompressibleMimeTypes();
}

8
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/WebServletHandlerTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@ -50,8 +50,8 @@ class WebServletHandlerTests { @@ -50,8 +50,8 @@ class WebServletHandlerTests {
@SuppressWarnings("unchecked")
@Test
void defaultServletConfiguration() throws IOException {
AnnotatedBeanDefinition servletdefinition = createBeanDefinition(DefaultConfigurationServlet.class);
this.handler.handle(servletdefinition, this.registry);
AnnotatedBeanDefinition servletDefinition = createBeanDefinition(DefaultConfigurationServlet.class);
this.handler.handle(servletDefinition, this.registry);
BeanDefinition servletRegistrationBean = this.registry
.getBeanDefinition(DefaultConfigurationServlet.class.getName());
MutablePropertyValues propertyValues = servletRegistrationBean.getPropertyValues();
@ -60,7 +60,7 @@ class WebServletHandlerTests { @@ -60,7 +60,7 @@ class WebServletHandlerTests {
assertThat((Integer) propertyValues.get("loadOnStartup")).isEqualTo(-1);
assertThat(propertyValues.get("name")).isEqualTo(DefaultConfigurationServlet.class.getName());
assertThat((String[]) propertyValues.get("urlMappings")).isEmpty();
assertThat(propertyValues.get("servlet")).isEqualTo(servletdefinition);
assertThat(propertyValues.get("servlet")).isEqualTo(servletDefinition);
}
@Test

Loading…
Cancel
Save