pull/22777/head
Stephane Nicoll 4 years ago
parent 8b3f8a6138
commit dac63fc3e5

@ -341,7 +341,7 @@ public class BomExtension {
private String repository = "spring-boot";
private List<String> issueLabels;
private final List<String> issueLabels;
private GitHub(String organization, String repository, List<String> issueLabels) {
this.organization = organization;

@ -47,7 +47,7 @@ public enum UpgradePolicy implements BiPredicate<DependencyVersion, DependencyVe
*/
SAME_MINOR_VERSION(DependencyVersion::isSameMinorAndNewerThan);
private BiPredicate<DependencyVersion, DependencyVersion> delegate;
private final BiPredicate<DependencyVersion, DependencyVersion> delegate;
UpgradePolicy(BiPredicate<DependencyVersion, DependencyVersion> delegate) {
this.delegate = delegate;

@ -27,9 +27,9 @@ import java.util.stream.Stream;
*/
class CompoundConfigurationTableEntry extends ConfigurationTableEntry {
private Set<String> configurationKeys;
private final Set<String> configurationKeys;
private String description;
private final String description;
CompoundConfigurationTableEntry(String key, String description) {
this.key = key;

@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
*/
public class MavenExec extends JavaExec {
private Logger log = LoggerFactory.getLogger(MavenExec.class);
private final Logger log = LoggerFactory.getLogger(MavenExec.class);
private File projectDir;

@ -27,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class CompoundConfigurationTableEntryTests {
private static String NEWLINE = System.lineSeparator();
private static final String NEWLINE = System.lineSeparator();
@Test
void simpleProperty() {

@ -27,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class ConfigurationTableTests {
private static String NEWLINE = System.lineSeparator();
private static final String NEWLINE = System.lineSeparator();
@Test
void simpleTable() {

@ -27,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class SingleConfigurationTableEntryTests {
private static String NEWLINE = System.lineSeparator();
private static final String NEWLINE = System.lineSeparator();
@Test
void simpleProperty() {

@ -51,7 +51,7 @@ import org.springframework.util.ObjectUtils;
*/
class AutoConfiguredHealthEndpointGroups implements HealthEndpointGroups {
private static Predicate<String> ALL = (name) -> true;
private static final Predicate<String> ALL = (name) -> true;
private final HealthEndpointGroup primaryGroup;

@ -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.
@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class RabbitHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(RabbitAutoConfiguration.class,
RabbitHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class AuditAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(AuditAutoConfiguration.class));
@Test

@ -34,8 +34,9 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class AvailabilityHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(AutoConfigurations
.of(ApplicationAvailabilityAutoConfiguration.class, AvailabilityHealthContributorAutoConfiguration.class));
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ApplicationAvailabilityAutoConfiguration.class,
AvailabilityHealthContributorAutoConfiguration.class));
@Test
void probesWhenNotKubernetesAddsNoBeans() {

@ -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.
@ -49,7 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class CloudFoundryReactiveHealthEndpointWebExtensionTests {
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
.withPropertyValues("VCAP_APPLICATION={}")
.withConfiguration(AutoConfigurations.of(ReactiveSecurityAutoConfiguration.class,
ReactiveUserDetailsServiceAutoConfiguration.class, WebFluxAutoConfiguration.class,

@ -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.
@ -48,7 +48,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class CloudFoundryHealthEndpointWebExtensionTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withPropertyValues("VCAP_APPLICATION={}")
.withConfiguration(AutoConfigurations.of(SecurityAutoConfiguration.class, WebMvcAutoConfiguration.class,
JacksonAutoConfiguration.class, DispatcherServletAutoConfiguration.class,

@ -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.
@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class CloudFoundryInfoEndpointWebExtensionTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withPropertyValues("VCAP_APPLICATION={}")
.withConfiguration(AutoConfigurations.of(SecurityAutoConfiguration.class, WebMvcAutoConfiguration.class,
JacksonAutoConfiguration.class, DispatcherServletAutoConfiguration.class,

@ -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.
@ -35,7 +35,7 @@ import static org.mockito.Mockito.mock;
*/
class CouchbaseHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withBean(Cluster.class, () -> mock(Cluster.class)).withConfiguration(AutoConfigurations
.of(CouchbaseHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -35,7 +35,7 @@ import static org.mockito.Mockito.mock;
*/
class CouchbaseReactiveHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withBean(Cluster.class, () -> mock(Cluster.class))
.withConfiguration(AutoConfigurations.of(CouchbaseReactiveHealthContributorAutoConfiguration.class,
HealthContributorAutoConfiguration.class));

@ -36,8 +36,9 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class ElasticsearchReactiveHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(AutoConfigurations
.of(ElasticsearchDataAutoConfiguration.class, ReactiveElasticsearchRestClientAutoConfiguration.class,
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ElasticsearchDataAutoConfiguration.class,
ReactiveElasticsearchRestClientAutoConfiguration.class,
ElasticsearchRestClientAutoConfiguration.class,
ElasticSearchReactiveHealthContributorAutoConfiguration.class,
HealthContributorAutoConfiguration.class));

@ -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 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class ServletEndpointManagementContextConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withUserConfiguration(TestConfig.class);
@Test

@ -54,7 +54,7 @@ class WebEndpointAutoConfigurationTests {
private static final AutoConfigurations CONFIGURATIONS = AutoConfigurations.of(EndpointAutoConfiguration.class,
WebEndpointAutoConfiguration.class);
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(CONFIGURATIONS);
@Test

@ -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.
@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class HazelcastHealthContributorAutoConfigurationIntegrationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(HazelcastHealthContributorAutoConfiguration.class,
HazelcastAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class HazelcastHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(HazelcastAutoConfiguration.class,
HazelcastHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class HealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(HealthContributorAutoConfiguration.class));
@Test

@ -68,11 +68,11 @@ import static org.mockito.Mockito.mock;
@SuppressWarnings("deprecation")
class HealthEndpointAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withUserConfiguration(HealthIndicatorsConfiguration.class).withConfiguration(AutoConfigurations
.of(HealthContributorAutoConfiguration.class, HealthEndpointAutoConfiguration.class));
private ReactiveWebApplicationContextRunner reactiveContextRunner = new ReactiveWebApplicationContextRunner()
private final ReactiveWebApplicationContextRunner reactiveContextRunner = new ReactiveWebApplicationContextRunner()
.withUserConfiguration(HealthIndicatorsConfiguration.class).withConfiguration(AutoConfigurations
.of(HealthContributorAutoConfiguration.class, HealthEndpointAutoConfiguration.class));

@ -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.
@ -34,7 +34,7 @@ import static org.mockito.Mockito.mock;
*/
class InfluxDbHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withBean(InfluxDB.class, () -> mock(InfluxDB.class)).withConfiguration(AutoConfigurations
.of(InfluxDbHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -46,7 +46,7 @@ import org.springframework.test.web.reactive.server.WebTestClient;
*/
class WebFluxEndpointCorsIntegrationTests {
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class, CodecsAutoConfiguration.class,
WebFluxAutoConfiguration.class, HttpHandlerAutoConfiguration.class, EndpointAutoConfiguration.class,
WebEndpointAutoConfiguration.class, ManagementContextAutoConfiguration.class,

@ -48,7 +48,7 @@ import static org.mockito.Mockito.mock;
*/
class DataSourceHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class,
HealthContributorAutoConfiguration.class, DataSourceHealthContributorAutoConfiguration.class))
.withPropertyValues("spring.datasource.initialization-mode=never");

@ -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.
@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class JmsHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ActiveMQAutoConfiguration.class,
JmsHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -35,7 +35,7 @@ import static org.mockito.Mockito.mock;
*/
class LdapHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withBean(LdapOperations.class, () -> mock(LdapOperations.class)).withConfiguration(AutoConfigurations
.of(LdapHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.contentOf;
*/
class LogFileWebEndpointAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(LogFileWebEndpointAutoConfiguration.class));
@Test

@ -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.
@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class MailHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(MailSenderAutoConfiguration.class,
MailHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class))
.withPropertyValues("spring.mail.host:smtp.example.com");

@ -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.
@ -41,7 +41,7 @@ class CompositeMeterRegistryAutoConfigurationTests {
private static final String COMPOSITE_NAME = "compositeMeterRegistry";
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withUserConfiguration(BaseConfig.class)
.withConfiguration(AutoConfigurations.of(CompositeMeterRegistryAutoConfiguration.class));

@ -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.
@ -48,7 +48,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class MeterRegistryConfigurerIntegrationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.with(MetricsRun.limitedTo(AtlasMetricsExportAutoConfiguration.class,
PrometheusMetricsExportAutoConfiguration.class))
.withConfiguration(AutoConfigurations.of(JvmMetricsAutoConfiguration.class));

@ -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.
@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class MeterRegistryCustomizerTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.with(MetricsRun.limitedTo(AtlasMetricsExportAutoConfiguration.class,
PrometheusMetricsExportAutoConfiguration.class))
.withConfiguration(AutoConfigurations.of(JvmMetricsAutoConfiguration.class));

@ -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.
@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class MetricsAutoConfigurationIntegrationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple());
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple());
@Test
void propertyBasedMeterFilteringIsAutoConfigured() {

@ -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.
@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class RabbitMetricsAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple())
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple())
.withConfiguration(
AutoConfigurations.of(RabbitAutoConfiguration.class, RabbitMetricsAutoConfiguration.class));

@ -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.
@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class CacheMetricsAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple())
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple())
.withUserConfiguration(CachingConfiguration.class).withConfiguration(
AutoConfigurations.of(CacheAutoConfiguration.class, CacheMetricsAutoConfiguration.class));

@ -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.
@ -53,7 +53,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class DataSourcePoolMetricsAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("spring.datasource.generate-unique-name=true").with(MetricsRun.simple())
.withConfiguration(AutoConfigurations.of(DataSourcePoolMetricsAutoConfiguration.class))
.withUserConfiguration(BaseConfiguration.class);

@ -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.
@ -58,7 +58,7 @@ import static org.mockito.Mockito.mock;
*/
class HibernateMetricsAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple())
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple())
.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class,
HibernateJpaAutoConfiguration.class, HibernateMetricsAutoConfiguration.class))
.withUserConfiguration(BaseConfiguration.class);

@ -49,7 +49,7 @@ import static org.mockito.Mockito.mock;
@ExtendWith(OutputCaptureExtension.class)
class WebFluxMetricsAutoConfigurationTests {
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
.with(MetricsRun.simple()).withConfiguration(AutoConfigurations.of(WebFluxMetricsAutoConfiguration.class));
@Test

@ -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.
@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class MongoHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(MongoAutoConfiguration.class, MongoDataAutoConfiguration.class,
MongoHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class MongoReactiveHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(MongoAutoConfiguration.class, MongoDataAutoConfiguration.class,
MongoReactiveAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class,
MongoReactiveHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@ClassPathExclusions({ "reactor-core*.jar", "lettuce-core*.jar" })
class RedisHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class,
RedisHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class RedisReactiveHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class,
RedisReactiveHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -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.
@ -65,7 +65,7 @@ import static org.mockito.Mockito.mock;
*/
class ReactiveManagementWebSecurityAutoConfigurationTests {
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(HealthContributorAutoConfiguration.class,
HealthEndpointAutoConfiguration.class, InfoEndpointAutoConfiguration.class,
EnvironmentEndpointAutoConfiguration.class, EndpointAutoConfiguration.class,

@ -53,7 +53,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class ManagementWebSecurityAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner().withConfiguration(
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner().withConfiguration(
AutoConfigurations.of(HealthContributorAutoConfiguration.class, HealthEndpointAutoConfiguration.class,
InfoEndpointAutoConfiguration.class, EnvironmentEndpointAutoConfiguration.class,
EndpointAutoConfiguration.class, WebEndpointAutoConfiguration.class,

@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class SecurityRequestMatchersManagementContextConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(SecurityRequestMatchersManagementContextConfiguration.class));
@Test

@ -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.
@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class SolrHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(SolrAutoConfiguration.class,
SolrHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));

@ -34,8 +34,9 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class DiskSpaceHealthContributorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(AutoConfigurations
.of(DiskSpaceHealthContributorAutoConfiguration.class, HealthContributorAutoConfiguration.class));
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(DiskSpaceHealthContributorAutoConfiguration.class,
HealthContributorAutoConfiguration.class));
@Test
void runShouldCreateIndicator() {

@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class WebMvcEndpointChildContextConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withAllowBeanDefinitionOverriding(true);
@Test

@ -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.
@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class HttpTraceAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(HttpTraceAutoConfiguration.class));
@Test

@ -41,7 +41,7 @@ public class AvailabilityStateHealthIndicator extends AbstractHealthIndicator {
private final ApplicationAvailability applicationAvailability;
private Class<? extends AvailabilityState> stateType;
private final Class<? extends AvailabilityState> stateType;
private final Map<AvailabilityState, Status> statusMappings = new HashMap<>();

@ -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.
@ -51,7 +51,7 @@ import static org.springframework.web.reactive.function.server.RouterFunctions.r
*/
class HttpTraceWebFilterIntegrationTests {
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
.withUserConfiguration(Config.class);
@Test

@ -206,7 +206,7 @@ public abstract class AutoConfigurationPackages {
static final class BasePackagesBeanDefinition extends GenericBeanDefinition {
private Set<String> basePackages = new LinkedHashSet<>();
private final Set<String> basePackages = new LinkedHashSet<>();
BasePackagesBeanDefinition(String... basePackages) {
setBeanClass(BasePackages.class);

@ -37,7 +37,7 @@ import org.springframework.util.StringUtils;
*/
public final class ConditionMessage {
private String message;
private final String message;
private ConditionMessage() {
this(null);

@ -150,7 +150,7 @@ public class EntityScanPackages {
static class EntityScanPackagesBeanDefinition extends GenericBeanDefinition {
private Set<String> packageNames = new LinkedHashSet<>();
private final Set<String> packageNames = new LinkedHashSet<>();
EntityScanPackagesBeanDefinition(Collection<String> packageNames) {
setBeanClass(EntityScanPackages.class);

@ -67,7 +67,7 @@ public class LdapProperties {
*/
private final Map<String, String> baseEnvironment = new HashMap<>();
private Template template = new Template();
private final Template template = new Template();
public String[] getUrls() {
return this.urls;

@ -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.
@ -63,7 +63,7 @@ public class SecurityProperties {
private final Filter filter = new Filter();
private User user = new User();
private final User user = new User();
public User getUser() {
return this.user;

@ -39,7 +39,7 @@ public class Saml2RelyingPartyProperties {
/**
* SAML2 relying party registrations.
*/
private Map<String, Registration> registration = new LinkedHashMap<>();
private final Map<String, Registration> registration = new LinkedHashMap<>();
public Map<String, Registration> getRegistration() {
return this.registration;
@ -62,7 +62,7 @@ public class Saml2RelyingPartyProperties {
/**
* Remote SAML Identity Provider.
*/
private Identityprovider identityprovider = new Identityprovider();
private final Identityprovider identityprovider = new Identityprovider();
public String getRelyingPartyEntityId() {
return this.relyingPartyEntityId;
@ -92,6 +92,10 @@ public class Saml2RelyingPartyProperties {
return this.credentials;
}
public void setCredentials(List<Credential> credentials) {
this.credentials = credentials;
}
public static class Credential {
/**
@ -136,9 +140,9 @@ public class Saml2RelyingPartyProperties {
*/
private String entityId;
private Singlesignon singlesignon = new Singlesignon();
private final Singlesignon singlesignon = new Singlesignon();
private Verification verification = new Verification();
private final Verification verification = new Verification();
public String getEntityId() {
return this.entityId;
@ -227,6 +231,10 @@ public class Saml2RelyingPartyProperties {
return this.credentials;
}
public void setCredentials(List<Credential> credentials) {
this.credentials = credentials;
}
public static class Credential {
/**

@ -54,7 +54,7 @@ public class HttpHandlerAutoConfiguration {
@Configuration(proxyBeanMethods = false)
public static class AnnotationConfig {
private ApplicationContext applicationContext;
private final ApplicationContext applicationContext;
public AnnotationConfig(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;

@ -43,7 +43,7 @@ import static org.mockito.Mockito.mock;
*/
class ElasticsearchDataAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ElasticsearchRestClientAutoConfiguration.class,
ReactiveElasticsearchRestClientAutoConfiguration.class, ElasticsearchDataAutoConfiguration.class));

@ -51,7 +51,7 @@ class ElasticsearchRepositoriesAutoConfigurationTests {
static final ElasticsearchContainer elasticsearch = new VersionOverridingElasticsearchContainer()
.withStartupAttempts(5).withStartupTimeout(Duration.ofMinutes(10));
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ElasticsearchRestClientAutoConfiguration.class,
ElasticsearchRepositoriesAutoConfiguration.class, ElasticsearchDataAutoConfiguration.class))
.withPropertyValues("spring.elasticsearch.rest.uris=" + elasticsearch.getHttpHostAddress());

@ -50,7 +50,7 @@ public class ReactiveElasticsearchRepositoriesAutoConfigurationTests {
static ElasticsearchContainer elasticsearch = new VersionOverridingElasticsearchContainer().withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10));
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ReactiveElasticsearchRestClientAutoConfiguration.class,
ReactiveElasticsearchRepositoriesAutoConfiguration.class, ElasticsearchDataAutoConfiguration.class))
.withPropertyValues("spring.data.elasticsearch.client.reactive.endpoints=" + elasticsearch.getHost() + ":"

@ -50,7 +50,7 @@ public class ReactiveElasticsearchRestClientAutoConfigurationTests {
static ElasticsearchContainer elasticsearch = new VersionOverridingElasticsearchContainer().withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10));
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ReactiveElasticsearchRestClientAutoConfiguration.class));
@Test

@ -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.
@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class RedisReactiveAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(
AutoConfigurations.of(RedisAutoConfiguration.class, RedisReactiveAutoConfiguration.class));
@Test

@ -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.
@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@ClassPathOverrides("org.flywaydb:flyway-core:5.2.4")
class Flyway5xAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(FlywayAutoConfiguration.class))
.withPropertyValues("spring.datasource.generate-unique-name=true");

@ -82,7 +82,7 @@ import static org.mockito.Mockito.mock;
@ExtendWith(OutputCaptureExtension.class)
class FlywayAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(FlywayAutoConfiguration.class))
.withPropertyValues("spring.datasource.generate-unique-name=true");

@ -52,7 +52,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class HypermediaAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withUserConfiguration(BaseConfig.class);
@Test

@ -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.
@ -48,7 +48,7 @@ class HazelcastJpaDependencyAutoConfigurationTests {
private static final String POST_PROCESSOR_BEAN_NAME = HazelcastInstanceEntityManagerFactoryDependsOnPostProcessor.class
.getName();
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class,
HibernateJpaAutoConfiguration.class, HazelcastJpaDependencyAutoConfiguration.class))
.withPropertyValues("spring.datasource.generate-unique-name=true",

@ -65,7 +65,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class HttpMessageConvertersAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(HttpMessageConvertersAutoConfiguration.class));
@Test

@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class CodecsAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(CodecsAutoConfiguration.class));
@Test

@ -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.
@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class ProjectInfoAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(
AutoConfigurations.of(PropertyPlaceholderAutoConfiguration.class, ProjectInfoAutoConfiguration.class));
@Test

@ -70,7 +70,7 @@ import static org.mockito.Mockito.mock;
*/
class IntegrationAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(JmxAutoConfiguration.class, IntegrationAutoConfiguration.class));
@Test

@ -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.
@ -57,7 +57,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
*/
class DataSourceInitializerInvokerTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class))
.withPropertyValues("spring.datasource.initialization-mode=never",
"spring.datasource.url:jdbc:hsqldb:mem:init-" + UUID.randomUUID());

@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class HikariDataSourceConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class))
.withPropertyValues("spring.datasource.initialization-mode=never",
"spring.datasource.type=" + HikariDataSource.class.getName());

@ -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.
@ -65,7 +65,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
*/
class JooqAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(JooqAutoConfiguration.class))
.withPropertyValues("spring.datasource.name:jooqtest");

@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class ApplicationAvailabilityAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ApplicationAvailabilityAutoConfiguration.class));
@Test

@ -42,7 +42,7 @@ import static org.mockito.Mockito.mock;
*/
class LdapAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(LdapAutoConfiguration.class));
@Test

@ -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.
@ -62,8 +62,9 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class ReactiveOAuth2ClientAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(AutoConfigurations
.of(ReactiveOAuth2ClientAutoConfiguration.class, ReactiveSecurityAutoConfiguration.class));
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ReactiveOAuth2ClientAutoConfiguration.class,
ReactiveSecurityAutoConfiguration.class));
private static final String REGISTRATION_PREFIX = "spring.security.oauth2.client.registration";

@ -74,7 +74,7 @@ import static org.mockito.Mockito.mock;
*/
class ReactiveOAuth2ResourceServerAutoConfigurationTests {
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ReactiveOAuth2ResourceServerAutoConfiguration.class))
.withUserConfiguration(TestConfig.class);

@ -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.
@ -38,7 +38,7 @@ import static org.mockito.Mockito.mock;
*/
class ReactiveSecurityAutoConfigurationTests {
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner();
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner();
@Test
void backsOffWhenWebFilterChainProxyBeanPresent() {

@ -39,9 +39,10 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class RSocketSecurityAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(AutoConfigurations
.of(ReactiveUserDetailsServiceAutoConfiguration.class, RSocketSecurityAutoConfiguration.class,
RSocketMessagingAutoConfiguration.class, RSocketStrategiesAutoConfiguration.class));
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ReactiveUserDetailsServiceAutoConfiguration.class,
RSocketSecurityAutoConfiguration.class, RSocketMessagingAutoConfiguration.class,
RSocketStrategiesAutoConfiguration.class));
@Test
void autoConfigurationEnablesRSocketSecurity() {

@ -51,7 +51,7 @@ public class Saml2RelyingPartyAutoConfigurationTests {
private static final String PREFIX = "spring.security.saml2.relyingparty.registration";
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner().withConfiguration(
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner().withConfiguration(
AutoConfigurations.of(Saml2RelyingPartyAutoConfiguration.class, SecurityAutoConfiguration.class));
@Test

@ -56,7 +56,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class SecurityAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner().withConfiguration(
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner().withConfiguration(
AutoConfigurations.of(SecurityAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class));
@Test

@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class TaskSchedulingAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withUserConfiguration(TestConfiguration.class)
.withConfiguration(AutoConfigurations.of(TaskSchedulingAutoConfiguration.class));

@ -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.
@ -63,7 +63,7 @@ class ThymeleafReactiveAutoConfigurationTests {
private final BuildOutput buildOutput = new BuildOutput(getClass());
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ThymeleafAutoConfiguration.class));
@Test

@ -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.
@ -46,7 +46,7 @@ import static org.mockito.Mockito.verify;
*/
class ValidatorAdapterTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner();
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner();
@Test
void wrapLocalValidatorFactoryBean() {

@ -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.
@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class ResourcePropertiesBindingTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withUserConfiguration(TestConfiguration.class);
@Test

@ -66,7 +66,7 @@ import static org.mockito.Mockito.verify;
*/
class ReactiveWebServerFactoryAutoConfigurationTests {
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner(
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner(
AnnotationConfigReactiveWebServerApplicationContext::new)
.withConfiguration(AutoConfigurations.of(ReactiveWebServerFactoryAutoConfiguration.class));

@ -91,7 +91,7 @@ class WebFluxAutoConfigurationTests {
private static final MockReactiveWebServerFactory mockReactiveWebServerFactory = new MockReactiveWebServerFactory();
private ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(WebFluxAutoConfiguration.class))
.withUserConfiguration(Config.class);

@ -42,7 +42,7 @@ import static org.mockito.Mockito.verify;
*/
class ClientHttpConnectorAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ClientHttpConnectorAutoConfiguration.class));
@Test

@ -50,7 +50,7 @@ import static org.mockito.Mockito.verify;
*/
class WebClientAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(
AutoConfigurations.of(ClientHttpConnectorAutoConfiguration.class, WebClientAutoConfiguration.class));
@Test

@ -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.
@ -46,7 +46,7 @@ import static org.mockito.Mockito.mock;
*/
class DispatcherServletAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(DispatcherServletAutoConfiguration.class));
@Test

@ -79,7 +79,7 @@ import static org.mockito.Mockito.verify;
*/
class ServletWebServerFactoryAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner(
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner(
AnnotationConfigServletWebServerApplicationContext::new)
.withConfiguration(AutoConfigurations.of(ServletWebServerFactoryAutoConfiguration.class,
DispatcherServletAutoConfiguration.class))

@ -212,9 +212,9 @@ class BasicErrorControllerMockMvcTests {
private class ErrorDispatcher implements RequestBuilder {
private MvcResult result;
private final MvcResult result;
private String path;
private final String path;
ErrorDispatcher(MvcResult result, String path) {
this.result = result;

@ -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.
@ -104,7 +104,7 @@ public abstract class AnnotatedNodeASTTransformation implements ASTTransformatio
private final SourceUnit source;
private List<AnnotationNode> annotationNodes;
private final List<AnnotationNode> annotationNodes;
ClassVisitor(SourceUnit source, List<AnnotationNode> annotationNodes) {
this.source = 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.
@ -31,7 +31,7 @@ import java.net.URLStreamHandler;
*/
public class ClassLoaderFileURLStreamHandler extends URLStreamHandler {
private ClassLoaderFile file;
private final ClassLoaderFile file;
public ClassLoaderFileURLStreamHandler(ClassLoaderFile file) {
this.file = file;

@ -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.
@ -33,7 +33,7 @@ public class ExampleService {
private static final Charset CHARSET = StandardCharsets.UTF_8;
private RedisOperations<Object, Object> operations;
private final RedisOperations<Object, Object> operations;
public ExampleService(RedisOperations<Object, Object> operations) {
this.operations = operations;

@ -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.
@ -28,7 +28,7 @@ import org.springframework.web.client.RestTemplate;
@Service
public class AnotherExampleRestClient {
private RestTemplate restTemplate;
private final RestTemplate restTemplate;
public AnotherExampleRestClient(RestTemplateBuilder builder) {
this.restTemplate = builder.rootUri("https://example.com").build();

@ -49,7 +49,7 @@ import static org.mockito.Mockito.verify;
*/
class WebTestClientAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(WebTestClientAutoConfiguration.class));
@Test

@ -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.
@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class MockMvcAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(MockMvcAutoConfiguration.class));
@Test

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save