Merge pull request #21009 from dreis2211

* pr/21009:
  Update copyright year of changed file
  Polish

Closes gh-21009
pull/21130/head
Stephane Nicoll 5 years ago
commit 3907fb9e02

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

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

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

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

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

@ -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 {
}
@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");

@ -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=*")

@ -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":

@ -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 {
}
@Test
void registerContributorRegisteresContributors() {
void registerContributorRegistersContributors() {
this.registry.registerContributor("one", this.one);
this.registry.registerContributor("two", this.two);
assertThat(this.registry).hasSize(2);

@ -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
}
@Test
void whenLocalContanerEntityManagerFactoryBeanHasNoJpaVendorAdapterAutoConfigurationSucceeds() {
void whenLocalContainerEntityManagerFactoryBeanHasNoJpaVendorAdapterAutoConfigurationSucceeds() {
contextRunner()
.withUserConfiguration(
TestConfigurationWithLocalContainerEntityManagerFactoryBeanWithNoJpaVendorAdapter.class)

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

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

@ -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.

@ -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]

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

@ -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 {
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

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

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

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

@ -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

@ -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

@ -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/**"));

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

@ -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 {
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 {

@ -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")

@ -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 {
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 {
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 {
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 {
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 {
"jar", null, new DefaultArtifactHandler());
}
private Function<Owner, TarArchive> mockAplicationContent() {
private Function<Owner, TarArchive> mockApplicationContent() {
return (owner) -> null;
}

@ -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 {
}
@Test
void forgroundWhenOutsideBoundsThrowsException() {
void foregroundWhenOutsideBoundsThrowsException() {
assertThatIllegalArgumentException().isThrownBy(() -> Ansi8BitColor.foreground(-1))
.withMessage("Code must be between 0 and 255");
assertThatIllegalArgumentException().isThrownBy(() -> Ansi8BitColor.foreground(256))

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

@ -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 {
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 {
}
@Test
void scanWhenBasePackagesAndBasePackcageClassesProvidedShouldUseThat() throws IOException {
void scanWhenBasePackagesAndBasePackageClassesProvidedShouldUseThat() throws IOException {
DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
beanFactory.setAllowBeanDefinitionOverriding(false);
this.registrar.registerBeanDefinitions(

@ -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 {
@Bean
@ConfigurationPropertiesBinding
TestConveter testConveter() {
return new TestConveter();
TestConverter testConverter() {
return new TestConverter();
}
}
@ -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) {

@ -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 {
}
@Test // gh-18012
void machesWhenCalledWithDifferentApplicationContextDoesNotCache() {
void matchesWhenCalledWithDifferentApplicationContextDoesNotCache() {
StaticWebApplicationContext context1 = createWebApplicationContext();
StaticWebApplicationContext context2 = createWebApplicationContext();
TestApplicationContextRequestMatcher<ApplicationContext> matcher = new TestApplicationContextRequestMatcher<>(

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

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

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

@ -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 {
@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 {
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