From e560b7f6ba91140390a544bb38cb407374e588c7 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 21 Jun 2019 18:09:05 +0200 Subject: [PATCH] Remove public modifier on JUnit5 lifecycle methods See gh-17292 --- .../autoconfigure/SpringApplicationHierarchyTests.java | 2 +- .../ReactiveCloudFoundryActuatorAutoConfigurationTests.java | 2 +- .../ReactiveCloudFoundrySecurityInterceptorTests.java | 2 +- .../reactive/ReactiveCloudFoundrySecurityServiceTests.java | 4 ++-- .../cloudfoundry/reactive/ReactiveTokenValidatorTests.java | 2 +- .../servlet/CloudFoundrySecurityInterceptorTests.java | 2 +- .../servlet/CloudFoundrySecurityServiceTests.java | 2 +- .../servlet/SkipSslVerificationHttpRequestFactoryTests.java | 2 +- .../cloudfoundry/servlet/TokenValidatorTests.java | 2 +- .../endpoint/ExposeExcludePropertyEndpointFilterTests.java | 2 +- .../ConditionsReportEndpointDocumentationTests.java | 2 +- .../MappingsEndpointReactiveDocumentationTests.java | 2 +- .../MappingsEndpointServletDocumentationTests.java | 2 +- .../documentation/MockMvcEndpointDocumentationTests.java | 2 +- .../info/InfoContributorAutoConfigurationTests.java | 2 +- .../ControllerEndpointWebFluxIntegrationTests.java | 2 +- .../ControllerEndpointWebMvcIntegrationTests.java | 2 +- .../integrationtest/WebMvcEndpointIntegrationTests.java | 2 +- .../autoconfigure/metrics/MeterRegistryConfigurerTests.java | 2 +- .../boot/actuate/amqp/RabbitHealthIndicatorTests.java | 2 +- .../elasticsearch/ElasticsearchHealthIndicatorTests.java | 2 +- .../annotation/DiscoveredOperationsFactoryTests.java | 2 +- .../invoke/reflect/ReflectiveOperationInvokerTests.java | 2 +- .../invoker/cache/CachingOperationInvokerAdvisorTests.java | 2 +- .../boot/actuate/endpoint/jmx/JmxEndpointExporterTests.java | 2 +- .../actuate/endpoint/web/ServletEndpointRegistrarTests.java | 2 +- .../boot/actuate/env/EnvironmentEndpointTests.java | 2 +- .../actuate/env/EnvironmentEndpointWebIntegrationTests.java | 2 +- .../boot/actuate/health/CompositeHealthIndicatorTests.java | 2 +- .../actuate/health/DefaultHealthIndicatorRegistryTests.java | 2 +- .../health/DefaultReactiveHealthIndicatorRegistryTests.java | 2 +- .../boot/actuate/health/OrderedHealthAggregatorTests.java | 2 +- .../actuate/integration/IntegrationGraphEndpointTests.java | 2 +- .../boot/actuate/jdbc/DataSourceHealthIndicatorTests.java | 4 ++-- .../boot/actuate/logging/LogFileWebEndpointTests.java | 2 +- .../logging/LogFileWebEndpointWebIntegrationTests.java | 3 +-- .../actuate/logging/LoggersEndpointWebIntegrationTests.java | 2 +- .../boot/actuate/mail/MailHealthIndicatorTests.java | 2 +- .../management/HeapDumpWebEndpointWebIntegrationTests.java | 2 +- .../prometheus/PrometheusPushGatewayManagerTests.java | 2 +- .../web/client/MetricsRestTemplateCustomizerTests.java | 2 +- .../client/DefaultWebClientExchangeTagsProviderTests.java | 2 +- .../reactive/client/MetricsWebClientCustomizerTests.java | 2 +- .../client/MetricsWebClientFilterFunctionTests.java | 2 +- .../web/reactive/client/WebClientExchangeTagsTests.java | 2 +- .../metrics/web/reactive/server/MetricsWebFilterTests.java | 2 +- .../metrics/web/reactive/server/WebFluxTagsTests.java | 2 +- .../web/servlet/LongTaskTimingHandlerInterceptorTests.java | 2 +- .../web/servlet/WebMvcMetricsFilterAutoTimedTests.java | 2 +- .../metrics/web/servlet/WebMvcMetricsFilterTests.java | 2 +- .../metrics/web/servlet/WebMvcMetricsIntegrationTests.java | 2 +- .../boot/actuate/mongo/MongoHealthIndicatorTests.java | 2 +- .../boot/actuate/neo4j/Neo4jHealthIndicatorTests.java | 2 +- .../actuate/security/AuthenticationAuditListenerTests.java | 2 +- .../actuate/security/AuthorizationAuditListenerTests.java | 2 +- .../boot/actuate/solr/SolrHealthIndicatorTests.java | 2 +- .../boot/actuate/system/DiskSpaceHealthIndicatorTests.java | 2 +- .../reactive/ServerWebExchangeTraceableRequestTests.java | 2 +- .../web/trace/servlet/TraceableHttpServletRequestTests.java | 2 +- .../autoconfigure/AutoConfigurationExcludeFilterTests.java | 2 +- .../autoconfigure/AutoConfigurationImportSelectorTests.java | 2 +- .../boot/autoconfigure/AutoConfigurationReproTests.java | 2 +- .../boot/autoconfigure/AutoConfigurationSorterTests.java | 2 +- .../ImportAutoConfigurationImportSelectorTests.java | 2 +- .../batch/JobLauncherCommandLineRunnerTests.java | 4 ++-- ...valuationReportAutoConfigurationImportListenerTests.java | 2 +- .../condition/ConditionEvaluationReportTests.java | 2 +- .../autoconfigure/condition/ConditionalOnJndiTests.java | 4 ++-- .../autoconfigure/condition/ConditionalOnPropertyTests.java | 2 +- .../condition/ConditionalOnSingleCandidateTests.java | 2 +- .../condition/ConditionalOnWebApplicationTests.java | 2 +- .../OnClassConditionAutoConfigurationImportFilterTests.java | 2 +- .../autoconfigure/condition/ResourceConditionTests.java | 2 +- .../ConfigurationPropertiesAutoConfigurationTests.java | 2 +- .../context/PropertyPlaceholderAutoConfigurationTests.java | 2 +- ...rsistenceExceptionTranslationAutoConfigurationTests.java | 2 +- .../CassandraDataAutoConfigurationIntegrationTests.java | 4 ++-- .../data/cassandra/CassandraDataAutoConfigurationTests.java | 2 +- .../CassandraReactiveDataAutoConfigurationTests.java | 2 +- .../data/couchbase/CouchbaseDataAutoConfigurationTests.java | 2 +- ...tiveAndImperativeRepositoriesAutoConfigurationTests.java | 2 +- .../CouchbaseReactiveDataAutoConfigurationTests.java | 2 +- ...CouchbaseReactiveRepositoriesAutoConfigurationTests.java | 2 +- .../CouchbaseRepositoriesAutoConfigurationTests.java | 2 +- .../elasticsearch/ElasticsearchAutoConfigurationTests.java | 4 ++-- .../ElasticsearchDataAutoConfigurationTests.java | 4 ++-- .../data/jpa/JpaWebAutoConfigurationTests.java | 2 +- .../data/ldap/LdapRepositoriesAutoConfigurationTests.java | 2 +- .../mongo/MixedMongoRepositoriesAutoConfigurationTests.java | 2 +- ...activeAndBlockingRepositoriesAutoConfigurationTests.java | 2 +- .../neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java | 2 +- .../boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java | 2 +- .../data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java | 2 +- .../data/redis/RedisRepositoriesAutoConfigurationTests.java | 4 ++-- .../data/rest/RepositoryRestMvcAutoConfigurationTests.java | 2 +- .../data/solr/SolrRepositoriesAutoConfigurationTests.java | 2 +- .../boot/autoconfigure/domain/EntityScanPackagesTests.java | 2 +- .../FreeMarkerAutoConfigurationServletIntegrationTests.java | 2 +- .../template/GroovyTemplateAutoConfigurationTests.java | 4 ++-- .../autoconfigure/h2/H2ConsoleAutoConfigurationTests.java | 4 ++-- .../hateoas/HypermediaAutoConfigurationTests.java | 2 +- .../jdbc/EmbeddedDataSourceConfigurationTests.java | 2 +- .../jdbc/JndiDataSourceAutoConfigurationTests.java | 6 +++--- .../jdbc/TomcatDataSourceConfigurationTests.java | 2 +- .../jms/JndiConnectionFactoryAutoConfigurationTests.java | 4 ++-- .../boot/autoconfigure/jmx/JmxAutoConfigurationTests.java | 2 +- .../boot/autoconfigure/jooq/JooqPropertiesTests.java | 2 +- .../kafka/KafkaAutoConfigurationIntegrationTests.java | 2 +- .../liquibase/LiquibaseAutoConfigurationTests.java | 2 +- .../mail/MailSenderAutoConfigurationTests.java | 4 ++-- .../mongo/embedded/EmbeddedMongoAutoConfigurationTests.java | 2 +- .../MustacheAutoConfigurationServletIntegrationTests.java | 2 +- .../autoconfigure/orm/jpa/HibernatePropertiesTests.java | 2 +- .../autoconfigure/security/SecurityPropertiesTests.java | 2 +- .../OAuth2ClientPropertiesRegistrationAdapterTests.java | 2 +- .../ReactiveOAuth2ResourceServerAutoConfigurationTests.java | 2 +- .../servlet/OAuth2ResourceServerAutoConfigurationTests.java | 2 +- .../sendgrid/SendGridAutoConfigurationTests.java | 2 +- .../template/TemplateAvailabilityProvidersTests.java | 2 +- .../transaction/TransactionAutoConfigurationTests.java | 2 +- .../transaction/jta/JtaAutoConfigurationTests.java | 2 +- .../validation/ValidationAutoConfigurationTests.java | 2 +- .../web/ConditionalOnEnabledResourceChainTests.java | 2 +- .../web/embedded/JettyWebServerFactoryCustomizerTests.java | 2 +- .../web/embedded/NettyWebServerFactoryCustomizerTests.java | 2 +- .../web/embedded/TomcatWebServerFactoryCustomizerTests.java | 2 +- .../embedded/UndertowWebServerFactoryCustomizerTests.java | 2 +- .../reactive/ReactiveWebServerFactoryCustomizerTests.java | 2 +- .../web/servlet/FilterOrderingIntegrationTests.java | 2 +- .../web/servlet/HttpEncodingAutoConfigurationTests.java | 2 +- .../web/servlet/MultipartAutoConfigurationTests.java | 2 +- .../web/servlet/ServletWebServerFactoryCustomizerTests.java | 2 +- .../TomcatServletWebServerFactoryCustomizerTests.java | 2 +- .../error/BasicErrorControllerDirectMockMvcTests.java | 2 +- .../servlet/error/BasicErrorControllerIntegrationTests.java | 2 +- .../web/servlet/error/BasicErrorControllerMockMvcTests.java | 2 +- .../web/servlet/error/DefaultErrorViewIntegrationTests.java | 2 +- .../web/servlet/error/DefaultErrorViewResolverTests.java | 2 +- .../servlet/WebSocketMessagingAutoConfigurationTests.java | 4 ++-- .../servlet/WebSocketServletAutoConfigurationTests.java | 4 ++-- .../it/java/org/springframework/boot/cli/CommandLineIT.java | 2 +- .../it/java/org/springframework/boot/cli/JarCommandIT.java | 2 +- .../it/java/org/springframework/boot/cli/WarCommandIT.java | 2 +- .../boot/cli/GrabCommandIntegrationTests.java | 2 +- .../boot/cli/RunCommandIntegrationTests.java | 4 ++-- .../boot/cli/app/SpringApplicationLauncherTests.java | 2 +- .../boot/cli/command/CommandRunnerTests.java | 4 ++-- .../command/encodepassword/EncodePasswordCommandTests.java | 4 ++-- .../boot/cli/command/init/InitCommandTests.java | 2 +- .../command/install/GroovyGrabDependencyResolverTests.java | 2 +- .../boot/cli/command/install/InstallerTests.java | 4 ++-- .../boot/cli/compiler/DependencyCustomizerTests.java | 2 +- .../ResolveDependencyCoordinatesTransformationTests.java | 2 +- .../dependencies/CompositeDependencyManagementTests.java | 2 +- ...ependencyManagementArtifactCoordinatesResolverTests.java | 2 +- .../cli/compiler/grape/DetailedProgressReporterTests.java | 2 +- ...peRootRepositorySystemSessionAutoConfigurationTests.java | 2 +- ...ngsXmlRepositorySystemSessionAutoConfigurationTests.java | 2 +- .../boot/devtools/RemoteUrlPropertyExtractorTests.java | 2 +- .../DevToolsPooledDataSourceAutoConfigurationTests.java | 4 ++-- .../autoconfigure/LocalDevToolsAutoConfigurationTests.java | 2 +- .../autoconfigure/OnEnabledDevToolsConditionTests.java | 2 +- .../autoconfigure/RemoteDevToolsAutoConfigurationTests.java | 4 ++-- .../classpath/ClassPathFileChangeListenerTests.java | 2 +- .../devtools/env/DevToolPropertiesIntegrationTests.java | 4 ++-- .../env/DevToolsHomePropertiesPostProcessorTests.java | 2 +- .../boot/devtools/filewatch/FileSystemWatcherTests.java | 2 +- .../boot/devtools/filewatch/FolderSnapshotTests.java | 2 +- .../boot/devtools/livereload/LiveReloadServerTests.java | 4 ++-- .../remote/client/ClassPathChangeUploaderTests.java | 2 +- .../remote/client/DelayedLiveReloadTriggerTests.java | 2 +- .../devtools/remote/client/HttpHeaderInterceptorTests.java | 2 +- .../remote/client/RemoteClientConfigurationTests.java | 2 +- .../boot/devtools/remote/server/DispatcherFilterTests.java | 2 +- .../boot/devtools/remote/server/DispatcherTests.java | 2 +- .../remote/server/HttpHeaderAccessManagerTests.java | 2 +- .../boot/devtools/remote/server/HttpStatusHandlerTests.java | 2 +- .../ClassLoaderFilesResourcePatternResolverTests.java | 2 +- .../boot/devtools/restart/MainMethodTests.java | 2 +- .../restart/OnInitializedRestarterConditionTests.java | 2 +- .../devtools/restart/RestartApplicationListenerTests.java | 2 +- .../boot/devtools/restart/RestarterTests.java | 4 ++-- .../restart/classloader/RestartClassLoaderTests.java | 4 ++-- .../devtools/restart/server/HttpRestartServerTests.java | 2 +- .../devtools/tunnel/client/HttpTunnelConnectionTests.java | 2 +- .../boot/devtools/tunnel/server/HttpTunnelServerTests.java | 2 +- .../tunnel/server/SocketTargetServerConnectionTests.java | 2 +- .../migrator/PropertiesMigrationListenerTests.java | 2 +- .../test/autoconfigure/orm/jpa/TestEntityManagerTests.java | 2 +- ...oConfigurationAdvancedConfigurationIntegrationTests.java | 2 +- .../MockMvcRestDocsAutoConfigurationIntegrationTests.java | 2 +- ...oConfigurationAdvancedConfigurationIntegrationTests.java | 2 +- ...estAssuredRestDocsAutoConfigurationIntegrationTests.java | 2 +- ...oConfigurationAdvancedConfigurationIntegrationTests.java | 2 +- ...TestClientRestDocsAutoConfigurationIntegrationTests.java | 2 +- .../test/context/SpringBootContextLoaderMockMvcTests.java | 2 +- .../assertj/ApplicationContextAssertProviderTests.java | 2 +- .../test/context/assertj/ApplicationContextAssertTests.java | 4 ++-- .../boot/test/json/GsonTesterIntegrationTests.java | 2 +- .../boot/test/json/JacksonTesterIntegrationTests.java | 2 +- .../boot/test/json/JsonContentAssertTests.java | 2 +- .../mock/mockito/MockitoContextCustomizerFactoryTests.java | 2 +- .../mock/mockito/MockitoTestExecutionListenerTests.java | 2 +- .../boot/test/mock/mockito/QualifierDefinitionTests.java | 2 +- ...ringBootTestRandomPortEnvironmentPostProcessorTests.java | 2 +- .../web/client/MockServerRestTemplateCustomizerTests.java | 2 +- .../web/client/RootUriRequestExpectationManagerTests.java | 2 +- .../AutoConfigureAnnotationProcessorTests.java | 2 +- .../AbstractMetadataGenerationTests.java | 2 +- .../tasks/bundling/LaunchScriptConfigurationTests.java | 2 +- .../springframework/boot/loader/tools/FileUtilsTests.java | 2 +- .../boot/loader/tools/MainClassFinderTests.java | 2 +- .../springframework/boot/loader/tools/RepackagerTests.java | 2 +- .../boot/loader/PropertiesLauncherTests.java | 4 ++-- .../boot/loader/archive/ExplodedArchiveTests.java | 2 +- .../boot/loader/archive/JarFileArchiveTests.java | 4 ++-- .../boot/loader/data/RandomAccessDataFileTests.java | 4 ++-- .../boot/loader/jar/CentralDirectoryParserTests.java | 4 ++-- .../org/springframework/boot/loader/jar/JarFileTests.java | 2 +- .../boot/loader/jar/JarURLConnectionTests.java | 4 ++-- .../boot/loader/util/SystemPropertyUtilsTests.java | 4 ++-- .../springframework/boot/maven/ArtifactsLibrariesTests.java | 2 +- .../src/test/java/org/springframework/boot/BannerTests.java | 4 ++-- .../org/springframework/boot/BeanDefinitionLoaderTests.java | 4 ++-- .../java/org/springframework/boot/ImageBannerTests.java | 4 ++-- .../java/org/springframework/boot/OverrideSourcesTests.java | 2 +- .../src/test/java/org/springframework/boot/ReproTests.java | 2 +- .../java/org/springframework/boot/ResourceBannerTests.java | 2 +- .../org/springframework/boot/SpringApplicationTests.java | 6 +++--- .../admin/SpringApplicationAdminMXBeanRegistrarTests.java | 4 ++-- .../springframework/boot/ansi/AnsiPropertySourceTests.java | 2 +- .../boot/builder/SpringApplicationBuilderTests.java | 2 +- .../boot/context/ApplicationPidFileWriterTests.java | 2 +- .../ContextIdApplicationContextInitializerTests.java | 2 +- .../boot/context/TypeExcludeFilterTests.java | 2 +- .../context/config/AnsiOutputApplicationListenerTests.java | 4 ++-- .../context/config/ConfigFileApplicationListenerTests.java | 2 +- ...nfigFileApplicationListenerYamlProfileNegationTests.java | 2 +- .../context/config/DelegatingApplicationListenerTests.java | 2 +- .../ConfigurationPropertiesBindHandlerAdvisorTests.java | 2 +- .../ConfigurationPropertiesScanRegistrarTests.java | 2 +- .../properties/ConfigurationPropertiesScanTests.java | 4 ++-- .../context/properties/ConfigurationPropertiesTests.java | 2 +- .../boot/context/properties/bind/BindConverterTests.java | 2 +- .../boot/context/properties/bind/BindResultTests.java | 2 +- .../bind/handler/IgnoreErrorsBindHandlerTests.java | 2 +- .../IgnoreTopLevelConverterNotFoundBindHandlerTests.java | 2 +- .../bind/test/PackagePrivateBeanBindingTests.java | 2 +- .../bind/validation/ValidationBindHandlerTests.java | 2 +- .../properties/source/UnboundElementsSourceFilterTests.java | 2 +- .../boot/diagnostics/FailureAnalyzersTests.java | 2 +- .../analyzer/BindValidationFailureAnalyzerTests.java | 4 ++-- .../UnboundConfigurationPropertyFailureAnalyzerTests.java | 4 ++-- .../boot/env/OriginTrackedPropertiesLoaderTests.java | 2 +- .../boot/env/OriginTrackedYamlLoaderTests.java | 2 +- .../boot/jackson/JsonComponentModuleTests.java | 2 +- .../springframework/boot/jdbc/DataSourceBuilderTests.java | 2 +- .../CompositeDataSourcePoolMetadataProviderTests.java | 2 +- .../LiquibaseServiceLocatorApplicationListenerTests.java | 2 +- .../boot/logging/LoggingSystemPropertiesTests.java | 4 ++-- .../springframework/boot/logging/LoggingSystemTests.java | 2 +- .../logging/logback/SpringBootJoranConfiguratorTests.java | 4 ++-- .../boot/logging/logback/SpringProfileActionTests.java | 2 +- .../jpa/hibernate/SpringPhysicalNamingStrategyTests.java | 2 +- .../boot/rsocket/netty/NettyRSocketServerFactoryTests.java | 2 +- ...TemplateBuilderClientHttpRequestFactoryWrapperTests.java | 2 +- .../boot/web/client/RestTemplateBuilderTests.java | 2 +- .../boot/web/context/WebServerPortFileWriterTest.java | 2 +- .../tomcat/CompressionConnectorCustomizerTests.java | 2 +- .../web/embedded/tomcat/SslConnectorCustomizerTests.java | 4 ++-- .../embedded/tomcat/TomcatServletWebServerFactoryTests.java | 2 +- .../web/embedded/undertow/FileSessionPersistenceTests.java | 2 +- .../boot/web/embedded/undertow/JarResourceManagerTests.java | 2 +- .../web/reactive/result/view/MustacheViewResolverTests.java | 2 +- .../boot/web/reactive/result/view/MustacheViewTests.java | 2 +- .../server/AbstractReactiveWebServerFactoryTests.java | 2 +- .../WebServerFactoryCustomizerBeanPostProcessorTests.java | 2 +- .../web/servlet/AbstractFilterRegistrationBeanTests.java | 2 +- .../web/servlet/FilterRegistrationIntegrationTests.java | 2 +- .../web/servlet/ServletComponentScanIntegrationTests.java | 2 +- .../web/servlet/ServletComponentScanRegistrarTests.java | 2 +- .../web/servlet/ServletListenerRegistrationBeanTests.java | 2 +- .../boot/web/servlet/ServletRegistrationBeanTests.java | 2 +- ...tationConfigServletWebServerApplicationContextTests.java | 2 +- .../context/ServletWebServerApplicationContextTests.java | 4 ++-- .../context/ServletWebServerMvcIntegrationTests.java | 2 +- .../server/AbstractServletWebServerFactoryTests.java | 2 +- .../servlet/support/ErrorPageFilterIntegrationTests.java | 2 +- .../servlet/support/SpringBootServletInitializerTests.java | 2 +- .../boot/web/servlet/view/MustacheViewResolverTests.java | 2 +- .../boot/web/servlet/view/MustacheViewTests.java | 2 +- .../webservices/client/WebServiceTemplateBuilderTests.java | 2 +- .../customsecurity/CorsSampleActuatorApplicationTests.java | 2 +- .../src/test/java/sample/aop/SampleAopApplicationTests.java | 4 ++-- .../sample/data/jdbc/SampleDataJdbcApplicationTests.java | 2 +- .../java/sample/data/jpa/SampleDataJpaApplicationTests.java | 2 +- .../sample/data/rest/SampleDataRestApplicationTests.java | 2 +- .../consumer/SampleIntegrationApplicationTests.java | 2 +- .../src/test/java/sample/jpa/SampleJpaApplicationTests.java | 2 +- .../java/sample/profile/SampleProfileApplicationTests.java | 4 ++-- .../SamplePropertyValidationApplicationTests.java | 2 +- .../java/sample/secure/SampleSecureApplicationTests.java | 4 ++-- .../java/sample/simple/SampleSimpleApplicationTests.java | 4 ++-- .../test/SampleTestApplicationWebIntegrationTests.java | 2 +- .../test/java/sample/test/web/UserVehicleServiceTests.java | 2 +- .../sample/groovytemplates/MessageControllerWebTests.java | 2 +- .../test/java/sample/web/ui/MessageControllerWebTests.java | 2 +- .../java/sample/webservices/SampleWsApplicationTests.java | 2 +- .../boot/devtools/tests/DevToolsIntegrationTests.java | 2 +- .../DevToolsWithLazyInitializationIntegrationTests.java | 2 +- 310 files changed, 361 insertions(+), 362 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/SpringApplicationHierarchyTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/SpringApplicationHierarchyTests.java index 90b536d702..b3c6fe512f 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/SpringApplicationHierarchyTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/SpringApplicationHierarchyTests.java @@ -46,7 +46,7 @@ class SpringApplicationHierarchyTests { private ConfigurableApplicationContext context; @AfterEach - public void after() { + void after() { ApplicationContextTestUtils.closeAll(this.context); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java index dcac9ee8d9..a2d9ecf8b1 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java @@ -92,7 +92,7 @@ class ReactiveCloudFoundryActuatorAutoConfigurationTests { ProjectInfoAutoConfiguration.class, ReactiveCloudFoundryActuatorAutoConfiguration.class)); @AfterEach - public void close() { + void close() { HttpResources.reset(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityInterceptorTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityInterceptorTests.java index 1628e08958..645b3bd287 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityInterceptorTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityInterceptorTests.java @@ -52,7 +52,7 @@ class ReactiveCloudFoundrySecurityInterceptorTests { private CloudFoundrySecurityInterceptor interceptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.interceptor = new CloudFoundrySecurityInterceptor(this.tokenValidator, this.securityService, "my-app-id"); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityServiceTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityServiceTests.java index 775d8c4e73..0f437b4d63 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityServiceTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityServiceTests.java @@ -54,14 +54,14 @@ class ReactiveCloudFoundrySecurityServiceTests { private WebClient.Builder builder; @BeforeEach - public void setup() { + void setup() { this.server = new MockWebServer(); this.builder = WebClient.builder().baseUrl(this.server.url("/").toString()); this.securityService = new ReactiveCloudFoundrySecurityService(this.builder, CLOUD_CONTROLLER, false); } @AfterEach - public void shutdown() throws Exception { + void shutdown() throws Exception { this.server.shutdown(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveTokenValidatorTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveTokenValidatorTests.java index 872a2f9cf5..c541e25758 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveTokenValidatorTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveTokenValidatorTests.java @@ -84,7 +84,7 @@ class ReactiveTokenValidatorTests { private static final Map VALID_KEYS = new ConcurrentHashMap<>(); @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); VALID_KEYS.put("valid-key", VALID_KEY); INVALID_KEYS.put("invalid-key", INVALID_KEY); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityInterceptorTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityInterceptorTests.java index 6c660f86b9..8ccaf56103 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityInterceptorTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityInterceptorTests.java @@ -54,7 +54,7 @@ class CloudFoundrySecurityInterceptorTests { private MockHttpServletRequest request; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.interceptor = new CloudFoundrySecurityInterceptor(this.tokenValidator, this.securityService, "my-app-id"); this.request = new MockHttpServletRequest(); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityServiceTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityServiceTests.java index 42a2352f94..70d2020ea0 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityServiceTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityServiceTests.java @@ -60,7 +60,7 @@ class CloudFoundrySecurityServiceTests { private MockRestServiceServer server; @BeforeEach - public void setup() { + void setup() { MockServerRestTemplateCustomizer mockServerCustomizer = new MockServerRestTemplateCustomizer(); RestTemplateBuilder builder = new RestTemplateBuilder(mockServerCustomizer); this.securityService = new CloudFoundrySecurityService(builder, CLOUD_CONTROLLER, false); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/SkipSslVerificationHttpRequestFactoryTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/SkipSslVerificationHttpRequestFactoryTests.java index 6ec0637c79..7bd6619f4e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/SkipSslVerificationHttpRequestFactoryTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/SkipSslVerificationHttpRequestFactoryTests.java @@ -42,7 +42,7 @@ class SkipSslVerificationHttpRequestFactoryTests { private WebServer webServer; @AfterEach - public void shutdownContainer() { + void shutdownContainer() { if (this.webServer != null) { this.webServer.stop(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/TokenValidatorTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/TokenValidatorTests.java index 16e561c194..a707f2ee7a 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/TokenValidatorTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/TokenValidatorTests.java @@ -84,7 +84,7 @@ class TokenValidatorTests { private static final Map VALID_KEYS = Collections.singletonMap("valid-key", VALID_KEY); @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.tokenValidator = new TokenValidator(this.securityService); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilterTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilterTests.java index 8741a91de7..99c24cce9e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilterTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilterTests.java @@ -41,7 +41,7 @@ class ExposeExcludePropertyEndpointFilterTests { private ExposeExcludePropertyEndpointFilter filter; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java index dae0a6582a..8856eb0286 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java @@ -58,7 +58,7 @@ class ConditionsReportEndpointDocumentationTests extends MockMvcEndpointDocument @Override @BeforeEach - public void setup(RestDocumentationContextProvider restDocumentation) { + void setup(RestDocumentationContextProvider restDocumentation) { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.applicationContext) .apply(MockMvcRestDocumentation.documentationConfiguration(restDocumentation).uris()).build(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointReactiveDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointReactiveDocumentationTests.java index 49654c99f8..5d1c7e78c1 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointReactiveDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointReactiveDocumentationTests.java @@ -70,7 +70,7 @@ class MappingsEndpointReactiveDocumentationTests extends AbstractEndpointDocumen private WebTestClient client; @BeforeEach - public void webTestClient(RestDocumentationContextProvider restDocumentation) { + void webTestClient(RestDocumentationContextProvider restDocumentation) { this.client = WebTestClient.bindToServer() .filter(documentationConfiguration(restDocumentation).snippets().withDefaults()) .baseUrl("http://localhost:" + this.port).build(); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java index 9cc3dc2b1f..a495edac38 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java @@ -70,7 +70,7 @@ class MappingsEndpointServletDocumentationTests extends AbstractEndpointDocument private WebTestClient client; @BeforeEach - public void webTestClient(RestDocumentationContextProvider restDocumentation) { + void webTestClient(RestDocumentationContextProvider restDocumentation) { this.client = WebTestClient.bindToServer().filter(documentationConfiguration(restDocumentation)) .baseUrl("http://localhost:" + this.port).build(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MockMvcEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MockMvcEndpointDocumentationTests.java index d2747a0046..3c2399f5fd 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MockMvcEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MockMvcEndpointDocumentationTests.java @@ -44,7 +44,7 @@ public abstract class MockMvcEndpointDocumentationTests extends AbstractEndpoint private WebApplicationContext applicationContext; @BeforeEach - public void setup(RestDocumentationContextProvider restDocumentation) { + void setup(RestDocumentationContextProvider restDocumentation) { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.applicationContext) .apply(MockMvcRestDocumentation.documentationConfiguration(restDocumentation).uris()).build(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoContributorAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoContributorAutoConfigurationTests.java index f97cab9e7f..98bd42bbb1 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoContributorAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoContributorAutoConfigurationTests.java @@ -45,7 +45,7 @@ class InfoContributorAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java index 001356cc1f..2457b2af57 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java @@ -50,7 +50,7 @@ class ControllerEndpointWebFluxIntegrationTests { private AnnotationConfigReactiveWebApplicationContext context; @AfterEach - public void close() { + void close() { TestSecurityContextHolder.clearContext(); this.context.close(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebMvcIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebMvcIntegrationTests.java index 04c1ed5ac0..d660371dcf 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebMvcIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebMvcIntegrationTests.java @@ -63,7 +63,7 @@ class ControllerEndpointWebMvcIntegrationTests { private AnnotationConfigServletWebApplicationContext context; @AfterEach - public void close() { + void close() { TestSecurityContextHolder.clearContext(); this.context.close(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java index 8de76b934d..36021b89f9 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java @@ -73,7 +73,7 @@ class WebMvcEndpointIntegrationTests { private AnnotationConfigServletWebApplicationContext context; @AfterEach - public void close() { + void close() { TestSecurityContextHolder.clearContext(); this.context.close(); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurerTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurerTests.java index 4b909d198b..b08e8ca339 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurerTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurerTests.java @@ -70,7 +70,7 @@ class MeterRegistryConfigurerTests { private Config mockConfig; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); given(this.mockRegistry.config()).willReturn(this.mockConfig); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/amqp/RabbitHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/amqp/RabbitHealthIndicatorTests.java index 969dd8475d..4beabea7bf 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/amqp/RabbitHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/amqp/RabbitHealthIndicatorTests.java @@ -50,7 +50,7 @@ class RabbitHealthIndicatorTests { private Channel channel; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); given(this.rabbitTemplate.execute(any())).willAnswer((invocation) -> { ChannelCallback callback = invocation.getArgument(0); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchHealthIndicatorTests.java index 86227c8562..c86cf309d0 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchHealthIndicatorTests.java @@ -64,7 +64,7 @@ class ElasticsearchHealthIndicatorTests { private ElasticsearchHealthIndicator indicator; @BeforeEach - public void setUp() { + void setUp() { MockitoAnnotations.initMocks(this); given(this.client.admin()).willReturn(this.admin); given(this.admin.cluster()).willReturn(this.cluster); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/DiscoveredOperationsFactoryTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/DiscoveredOperationsFactoryTests.java index a6d18b8219..4e0c440de7 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/DiscoveredOperationsFactoryTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/DiscoveredOperationsFactoryTests.java @@ -52,7 +52,7 @@ class DiscoveredOperationsFactoryTests { private List invokerAdvisors; @BeforeEach - public void setup() { + void setup() { this.parameterValueMapper = (parameter, value) -> value.toString(); this.invokerAdvisors = new ArrayList<>(); this.factory = new TestDiscoveredOperationsFactory(this.parameterValueMapper, this.invokerAdvisors); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoke/reflect/ReflectiveOperationInvokerTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoke/reflect/ReflectiveOperationInvokerTests.java index dcf1a9a3bb..8fe3adc03e 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoke/reflect/ReflectiveOperationInvokerTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoke/reflect/ReflectiveOperationInvokerTests.java @@ -48,7 +48,7 @@ class ReflectiveOperationInvokerTests { private ParameterValueMapper parameterValueMapper; @BeforeEach - public void setup() { + void setup() { this.target = new Example(); this.operationMethod = new OperationMethod(ReflectionUtils.findMethod(Example.class, "reverse", String.class), OperationType.READ); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvokerAdvisorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvokerAdvisorTests.java index 362c0d6909..c4519da2d2 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvokerAdvisorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvokerAdvisorTests.java @@ -55,7 +55,7 @@ class CachingOperationInvokerAdvisorTests { private CachingOperationInvokerAdvisor advisor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.advisor = new CachingOperationInvokerAdvisor(this.timeToLive); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporterTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporterTests.java index cd5643ffa1..4468c4a575 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporterTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporterTests.java @@ -71,7 +71,7 @@ class JmxEndpointExporterTests { private JmxEndpointExporter exporter; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.exporter = new JmxEndpointExporter(this.mBeanServer, this.objectNameFactory, this.responseMapper, this.endpoints); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/ServletEndpointRegistrarTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/ServletEndpointRegistrarTests.java index 8651d2a534..aa3594ccd3 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/ServletEndpointRegistrarTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/ServletEndpointRegistrarTests.java @@ -61,7 +61,7 @@ class ServletEndpointRegistrarTests { private ArgumentCaptor servlet; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); given(this.servletContext.addServlet(any(String.class), any(Servlet.class))).willReturn(this.dynamic); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointTests.java index 9117649fb0..2250fd400d 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointTests.java @@ -53,7 +53,7 @@ import static org.assertj.core.api.Assertions.assertThat; class EnvironmentEndpointTests { @AfterEach - public void close() { + void close() { System.clearProperty("VCAP_SERVICES"); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java index e140c7061b..c5cfbf3fbf 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java @@ -37,7 +37,7 @@ class EnvironmentEndpointWebIntegrationTests { private WebTestClient client; @BeforeEach - public void prepareEnvironment(ConfigurableApplicationContext context, WebTestClient client) { + void prepareEnvironment(ConfigurableApplicationContext context, WebTestClient client) { TestPropertyValues.of("foo:bar", "fool:baz").applyTo(context); this.client = client; this.context = context; diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java index 7a6e0efc5e..b9c8f3904d 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java @@ -47,7 +47,7 @@ class CompositeHealthIndicatorTests { private HealthIndicator two; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); given(this.one.health()).willReturn(new Health.Builder().unknown().withDetail("1", "1").build()); given(this.two.health()).willReturn(new Health.Builder().unknown().withDetail("2", "2").build()); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultHealthIndicatorRegistryTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultHealthIndicatorRegistryTests.java index 5cbf406b59..00283553a9 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultHealthIndicatorRegistryTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultHealthIndicatorRegistryTests.java @@ -42,7 +42,7 @@ class DefaultHealthIndicatorRegistryTests { private DefaultHealthIndicatorRegistry registry; @BeforeEach - public void setUp() { + void setUp() { given(this.one.health()).willReturn(new Health.Builder().unknown().withDetail("1", "1").build()); given(this.two.health()).willReturn(new Health.Builder().unknown().withDetail("2", "2").build()); this.registry = new DefaultHealthIndicatorRegistry(); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultReactiveHealthIndicatorRegistryTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultReactiveHealthIndicatorRegistryTests.java index d95b7f62b7..ed0e8cf885 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultReactiveHealthIndicatorRegistryTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/DefaultReactiveHealthIndicatorRegistryTests.java @@ -43,7 +43,7 @@ class DefaultReactiveHealthIndicatorRegistryTests { private DefaultReactiveHealthIndicatorRegistry registry; @BeforeEach - public void setUp() { + void setUp() { given(this.one.health()).willReturn(Mono.just(new Health.Builder().unknown().withDetail("1", "1").build())); given(this.two.health()).willReturn(Mono.just(new Health.Builder().unknown().withDetail("2", "2").build())); this.registry = new DefaultReactiveHealthIndicatorRegistry(); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/OrderedHealthAggregatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/OrderedHealthAggregatorTests.java index 5872363e2a..839a4f8d51 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/OrderedHealthAggregatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/OrderedHealthAggregatorTests.java @@ -35,7 +35,7 @@ class OrderedHealthAggregatorTests { private OrderedHealthAggregator healthAggregator; @BeforeEach - public void setup() { + void setup() { this.healthAggregator = new OrderedHealthAggregator(); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/integration/IntegrationGraphEndpointTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/integration/IntegrationGraphEndpointTests.java index 243b80642e..a211720fb8 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/integration/IntegrationGraphEndpointTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/integration/IntegrationGraphEndpointTests.java @@ -44,7 +44,7 @@ class IntegrationGraphEndpointTests { private IntegrationGraphEndpoint integrationGraphEndpoint; @BeforeEach - public void setUp() { + void setUp() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/jdbc/DataSourceHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/jdbc/DataSourceHealthIndicatorTests.java index 2ad4facce8..865d28d8ae 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/jdbc/DataSourceHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/jdbc/DataSourceHealthIndicatorTests.java @@ -51,14 +51,14 @@ class DataSourceHealthIndicatorTests { private SingleConnectionDataSource dataSource; @BeforeEach - public void init() { + void init() { EmbeddedDatabaseConnection db = EmbeddedDatabaseConnection.HSQL; this.dataSource = new SingleConnectionDataSource(db.getUrl("testdb") + ";shutdown=true", "sa", "", false); this.dataSource.setDriverClassName(db.getDriverClassName()); } @AfterEach - public void close() { + void close() { if (this.dataSource != null) { this.dataSource.destroy(); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointTests.java index f9b7debe50..2e3ae7e5f2 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointTests.java @@ -50,7 +50,7 @@ class LogFileWebEndpointTests { private File logFile; @BeforeEach - public void before(@TempDir Path temp) throws IOException { + void before(@TempDir Path temp) throws IOException { this.logFile = Files.createTempFile(temp, "junit", null).toFile(); FileCopyUtils.copy("--TEST--".getBytes(), this.logFile); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java index 49326d69a6..66b686e003 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java @@ -47,8 +47,7 @@ class LogFileWebEndpointWebIntegrationTests { private File logFile; @BeforeEach - public void setUp(@TempDir File temp, WebTestClient client, ConfigurableApplicationContext context) - throws IOException { + void setUp(@TempDir File temp, WebTestClient client, ConfigurableApplicationContext context) throws IOException { this.logFile = new File(temp, "test.log"); this.client = client; this.context = context; diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java index d0ced02224..a22ee6d358 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java @@ -59,7 +59,7 @@ class LoggersEndpointWebIntegrationTests { @BeforeEach @AfterEach - public void resetMocks(ConfigurableApplicationContext context, WebTestClient client) { + void resetMocks(ConfigurableApplicationContext context, WebTestClient client) { this.client = client; this.loggingSystem = context.getBean(LoggingSystem.class); Mockito.reset(this.loggingSystem); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mail/MailHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mail/MailHealthIndicatorTests.java index 004174957f..730ad787f2 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mail/MailHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mail/MailHealthIndicatorTests.java @@ -52,7 +52,7 @@ class MailHealthIndicatorTests { private MailHealthIndicator indicator; @BeforeEach - public void setup() { + void setup() { Session session = Session.getDefaultInstance(new Properties()); session.addProvider(new Provider(Type.TRANSPORT, "success", SuccessTransport.class.getName(), "Test", "1.0.0")); this.mailSender = mock(JavaMailSenderImpl.class); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java index da37f6672d..bae20b6718 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java @@ -45,7 +45,7 @@ class HeapDumpWebEndpointWebIntegrationTests { private TestHeapDumpWebEndpoint endpoint; @BeforeEach - public void configureEndpoint(ApplicationContext context) { + void configureEndpoint(ApplicationContext context) { this.endpoint = context.getBean(TestHeapDumpWebEndpoint.class); this.endpoint.setAvailable(true); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusPushGatewayManagerTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusPushGatewayManagerTests.java index b841bad395..17456fedd2 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusPushGatewayManagerTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusPushGatewayManagerTests.java @@ -72,7 +72,7 @@ class PrometheusPushGatewayManagerTests { private ScheduledFuture future; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.scheduler = mockScheduler(TaskScheduler.class); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java index acfda13ab7..e996d4d763 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java @@ -54,7 +54,7 @@ class MetricsRestTemplateCustomizerTests { private MetricsRestTemplateCustomizer customizer; @BeforeEach - public void setup() { + void setup() { this.registry = new SimpleMeterRegistry(SimpleConfig.DEFAULT, new MockClock()); this.restTemplate = new RestTemplate(); this.mockServer = MockRestServiceServer.createServer(this.restTemplate); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/DefaultWebClientExchangeTagsProviderTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/DefaultWebClientExchangeTagsProviderTests.java index 64ac5882af..85cad8865f 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/DefaultWebClientExchangeTagsProviderTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/DefaultWebClientExchangeTagsProviderTests.java @@ -50,7 +50,7 @@ class DefaultWebClientExchangeTagsProviderTests { private ClientResponse response; @BeforeEach - public void setup() { + void setup() { this.request = ClientRequest.create(HttpMethod.GET, URI.create("https://example.org/projects/spring-boot")) .attribute(URI_TEMPLATE_ATTRIBUTE, "https://example.org/projects/{project}").build(); this.response = mock(ClientResponse.class); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientCustomizerTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientCustomizerTests.java index 372758a3e8..b4dd2c1a33 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientCustomizerTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientCustomizerTests.java @@ -38,7 +38,7 @@ class MetricsWebClientCustomizerTests { private WebClient.Builder clientBuilder; @BeforeEach - public void setup() { + void setup() { this.customizer = new MetricsWebClientCustomizer(mock(MeterRegistry.class), mock(WebClientExchangeTagsProvider.class), "test", null); this.clientBuilder = WebClient.builder(); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientFilterFunctionTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientFilterFunctionTests.java index 70b53d8054..9b2ae06946 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientFilterFunctionTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientFilterFunctionTests.java @@ -60,7 +60,7 @@ class MetricsWebClientFilterFunctionTests { private ExchangeFunction exchange; @BeforeEach - public void setup() { + void setup() { this.registry = new SimpleMeterRegistry(SimpleConfig.DEFAULT, new MockClock()); this.filterFunction = new MetricsWebClientFilterFunction(this.registry, new DefaultWebClientExchangeTagsProvider(), "http.client.requests", AutoTimer.ENABLED); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTagsTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTagsTests.java index 4b12664353..5255885ee7 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTagsTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTagsTests.java @@ -48,7 +48,7 @@ class WebClientExchangeTagsTests { private ClientResponse response; @BeforeEach - public void setup() { + void setup() { this.request = ClientRequest.create(HttpMethod.GET, URI.create("https://example.org/projects/spring-boot")) .attribute(URI_TEMPLATE_ATTRIBUTE, "https://example.org/projects/{project}").build(); this.response = mock(ClientResponse.class); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java index 4ead61c21a..33f1e14126 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java @@ -47,7 +47,7 @@ class MetricsWebFilterTests { private MetricsWebFilter webFilter; @BeforeEach - public void setup() { + void setup() { MockClock clock = new MockClock(); this.registry = new SimpleMeterRegistry(SimpleConfig.DEFAULT, clock); this.webFilter = new MetricsWebFilter(this.registry, new DefaultWebFluxTagsProvider(), REQUEST_METRICS_NAME, diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTagsTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTagsTests.java index 8612a0a7f3..53f8742076 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTagsTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTagsTests.java @@ -45,7 +45,7 @@ class WebFluxTagsTests { private PathPatternParser parser = new PathPatternParser(); @BeforeEach - public void setup() { + void setup() { this.exchange = MockServerWebExchange.from(MockServerHttpRequest.get("")); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/LongTaskTimingHandlerInterceptorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/LongTaskTimingHandlerInterceptorTests.java index 8e59bbbb02..8422f6f12a 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/LongTaskTimingHandlerInterceptorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/LongTaskTimingHandlerInterceptorTests.java @@ -79,7 +79,7 @@ class LongTaskTimingHandlerInterceptorTests { private MockMvc mvc; @BeforeEach - public void setUpMockMvc() { + void setUpMockMvc() { this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build(); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilterAutoTimedTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilterAutoTimedTests.java index 68b28fb2cc..9ef90b6dc8 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilterAutoTimedTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilterAutoTimedTests.java @@ -68,7 +68,7 @@ class WebMvcMetricsFilterAutoTimedTests { private WebMvcMetricsFilter filter; @BeforeEach - public void setupMockMvc() { + void setupMockMvc() { this.mvc = MockMvcBuilders.webAppContextSetup(this.context).addFilters(this.filter).build(); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilterTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilterTests.java index cf7776aeaa..ea1b3d917a 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilterTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilterTests.java @@ -121,7 +121,7 @@ class WebMvcMetricsFilterTests { private CyclicBarrier completableFutureBarrier; @BeforeEach - public void setupMockMvc() { + void setupMockMvc() { this.mvc = MockMvcBuilders.webAppContextSetup(this.context) .addFilters(this.filter, new RedirectAndNotFoundFilter()).build(); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsIntegrationTests.java index 2716439987..a935c184d9 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsIntegrationTests.java @@ -72,7 +72,7 @@ class WebMvcMetricsIntegrationTests { private MockMvc mvc; @BeforeEach - public void setupMockMvc() { + void setupMockMvc() { this.mvc = MockMvcBuilders.webAppContextSetup(this.context).addFilters(this.filter).build(); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mongo/MongoHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mongo/MongoHealthIndicatorTests.java index 6b3537ffaa..cab01e86b1 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mongo/MongoHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mongo/MongoHealthIndicatorTests.java @@ -41,7 +41,7 @@ class MongoHealthIndicatorTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java index 9fd25b1a80..412bde8ec4 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java @@ -50,7 +50,7 @@ class Neo4jHealthIndicatorTests { private Neo4jHealthIndicator neo4jHealthIndicator; @BeforeEach - public void before() { + void before() { this.session = mock(Session.class); SessionFactory sessionFactory = mock(SessionFactory.class); given(sessionFactory.openSession()).willReturn(this.session); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthenticationAuditListenerTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthenticationAuditListenerTests.java index 3e33ce5cbc..e74db11946 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthenticationAuditListenerTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthenticationAuditListenerTests.java @@ -49,7 +49,7 @@ class AuthenticationAuditListenerTests { private final ApplicationEventPublisher publisher = mock(ApplicationEventPublisher.class); @BeforeEach - public void init() { + void init() { this.listener.setApplicationEventPublisher(this.publisher); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthorizationAuditListenerTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthorizationAuditListenerTests.java index 4eadffbf24..3fb709256e 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthorizationAuditListenerTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthorizationAuditListenerTests.java @@ -46,7 +46,7 @@ class AuthorizationAuditListenerTests { private final ApplicationEventPublisher publisher = mock(ApplicationEventPublisher.class); @BeforeEach - public void init() { + void init() { this.listener.setApplicationEventPublisher(this.publisher); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/solr/SolrHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/solr/SolrHealthIndicatorTests.java index 4858eec3a0..740885f9bd 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/solr/SolrHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/solr/SolrHealthIndicatorTests.java @@ -44,7 +44,7 @@ class SolrHealthIndicatorTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicatorTests.java index 0ec408534a..44b0b0c9fa 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicatorTests.java @@ -49,7 +49,7 @@ class DiskSpaceHealthIndicatorTests { private HealthIndicator healthIndicator; @BeforeEach - public void setUp() { + void setUp() { MockitoAnnotations.initMocks(this); given(this.fileMock.exists()).willReturn(true); given(this.fileMock.canRead()).willReturn(true); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/trace/reactive/ServerWebExchangeTraceableRequestTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/trace/reactive/ServerWebExchangeTraceableRequestTests.java index a8571669c2..0c5b257ac2 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/trace/reactive/ServerWebExchangeTraceableRequestTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/trace/reactive/ServerWebExchangeTraceableRequestTests.java @@ -43,7 +43,7 @@ class ServerWebExchangeTraceableRequestTests { private ServerHttpRequest request; @BeforeEach - public void setUp() { + void setUp() { this.exchange = mock(ServerWebExchange.class); this.request = mock(ServerHttpRequest.class); given(this.exchange.getRequest()).willReturn(this.request); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/trace/servlet/TraceableHttpServletRequestTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/trace/servlet/TraceableHttpServletRequestTests.java index 91f00230e2..505e2bf806 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/trace/servlet/TraceableHttpServletRequestTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/trace/servlet/TraceableHttpServletRequestTests.java @@ -32,7 +32,7 @@ class TraceableHttpServletRequestTests { private MockHttpServletRequest request; @BeforeEach - public void setup() { + void setup() { this.request = new MockHttpServletRequest("GET", "/script"); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationExcludeFilterTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationExcludeFilterTests.java index 4c237416f7..27f764b60e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationExcludeFilterTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationExcludeFilterTests.java @@ -45,7 +45,7 @@ class AutoConfigurationExcludeFilterTests { private AnnotationConfigApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorTests.java index 9df609c3ec..636dfb0164 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorTests.java @@ -61,7 +61,7 @@ class AutoConfigurationImportSelectorTests { private List filters = new ArrayList<>(); @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.importSelector.setBeanFactory(this.beanFactory); this.importSelector.setEnvironment(this.environment); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationReproTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationReproTests.java index 34dc5e775f..1dce4b0a5a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationReproTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationReproTests.java @@ -38,7 +38,7 @@ class AutoConfigurationReproTests { private ConfigurableApplicationContext context; @AfterEach - public void cleanup() { + void cleanup() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationSorterTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationSorterTests.java index 42c3a89d80..ceb6825892 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationSorterTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationSorterTests.java @@ -78,7 +78,7 @@ class AutoConfigurationSorterTests { private AutoConfigurationMetadata autoConfigurationMetadata = mock(AutoConfigurationMetadata.class); @BeforeEach - public void setup() { + void setup() { this.sorter = new AutoConfigurationSorter(new SkipCycleMetadataReaderFactory(), this.autoConfigurationMetadata); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelectorTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelectorTests.java index 38012675b6..cca72b9884 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelectorTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelectorTests.java @@ -58,7 +58,7 @@ class ImportAutoConfigurationImportSelectorTests { private Environment environment; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.importSelector.setBeanFactory(this.beanFactory); this.importSelector.setEnvironment(this.environment); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java index a4197686ff..67da126148 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java @@ -73,7 +73,7 @@ class JobLauncherCommandLineRunnerTests { private Step step; @BeforeEach - public void init() { + void init() { this.context.register(BatchConfiguration.class); this.context.refresh(); JobRepository jobRepository = this.context.getBean(JobRepository.class); @@ -90,7 +90,7 @@ class JobLauncherCommandLineRunnerTests { } @AfterEach - public void closeContext() { + void closeContext() { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportAutoConfigurationImportListenerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportAutoConfigurationImportListenerTests.java index e0af33381c..e090fc0225 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportAutoConfigurationImportListenerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportAutoConfigurationImportListenerTests.java @@ -45,7 +45,7 @@ class ConditionEvaluationReportAutoConfigurationImportListenerTests { private final ConfigurableListableBeanFactory beanFactory = new DefaultListableBeanFactory(); @BeforeEach - public void setup() { + void setup() { this.listener = new ConditionEvaluationReportAutoConfigurationImportListener(); this.listener.setBeanFactory(this.beanFactory); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportTests.java index 112f975b2c..7504d484be 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportTests.java @@ -78,7 +78,7 @@ class ConditionEvaluationReportTests { private ConditionOutcome outcome3; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.beanFactory = new DefaultListableBeanFactory(); this.report = ConditionEvaluationReport.get(this.beanFactory); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnJndiTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnJndiTests.java index fe55b6c241..e6b911e111 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnJndiTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnJndiTests.java @@ -54,13 +54,13 @@ class ConditionalOnJndiTests { private MockableOnJndi condition = new MockableOnJndi(); @BeforeEach - public void setupThreadContextClassLoader() { + void setupThreadContextClassLoader() { this.threadContextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(new JndiPropertiesHidingClassLoader(getClass().getClassLoader())); } @AfterEach - public void close() { + void close() { TestableInitialContextFactory.clearAll(); if (this.initialContextFactory != null) { System.setProperty(Context.INITIAL_CONTEXT_FACTORY, this.initialContextFactory); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnPropertyTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnPropertyTests.java index f9e2eaa576..d7dc04fecd 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnPropertyTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnPropertyTests.java @@ -52,7 +52,7 @@ class ConditionalOnPropertyTests { private ConfigurableEnvironment environment = new StandardEnvironment(); @AfterEach - public void tearDown() { + void tearDown() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnSingleCandidateTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnSingleCandidateTests.java index a6a78e4667..c91f3b84dd 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnSingleCandidateTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnSingleCandidateTests.java @@ -38,7 +38,7 @@ class ConditionalOnSingleCandidateTests { private final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnWebApplicationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnWebApplicationTests.java index 7b90675bac..a6b25e2e67 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnWebApplicationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnWebApplicationTests.java @@ -46,7 +46,7 @@ class ConditionalOnWebApplicationTests { private ConfigurableApplicationContext context; @AfterEach - public void closeContext() { + void closeContext() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/OnClassConditionAutoConfigurationImportFilterTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/OnClassConditionAutoConfigurationImportFilterTests.java index dbe159681f..b195632c88 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/OnClassConditionAutoConfigurationImportFilterTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/OnClassConditionAutoConfigurationImportFilterTests.java @@ -40,7 +40,7 @@ class OnClassConditionAutoConfigurationImportFilterTests { private DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory(); @BeforeEach - public void setup() { + void setup() { this.filter.setBeanClassLoader(getClass().getClassLoader()); this.filter.setBeanFactory(this.beanFactory); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ResourceConditionTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ResourceConditionTests.java index 0788587d1b..3b2e0a7aeb 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ResourceConditionTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ResourceConditionTests.java @@ -38,7 +38,7 @@ class ResourceConditionTests { private ConfigurableApplicationContext context; @AfterEach - public void tearDown() { + void tearDown() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/ConfigurationPropertiesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/ConfigurationPropertiesAutoConfigurationTests.java index 7c72e1bd69..49df1f2018 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/ConfigurationPropertiesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/ConfigurationPropertiesAutoConfigurationTests.java @@ -38,7 +38,7 @@ class ConfigurationPropertiesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void tearDown() { + void tearDown() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/PropertyPlaceholderAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/PropertyPlaceholderAutoConfigurationTests.java index bc64bc198d..e309a7f69e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/PropertyPlaceholderAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/PropertyPlaceholderAutoConfigurationTests.java @@ -39,7 +39,7 @@ class PropertyPlaceholderAutoConfigurationTests { private final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfigurationTests.java index 11ea0c8224..a435e86228 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfigurationTests.java @@ -48,7 +48,7 @@ class PersistenceExceptionTranslationAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java index e6d22fed1b..3b62c3c070 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java @@ -50,7 +50,7 @@ class CassandraDataAutoConfigurationIntegrationTests { private AnnotationConfigApplicationContext context; @BeforeEach - public void setUp() { + void setUp() { this.context = new AnnotationConfigApplicationContext(); TestPropertyValues .of("spring.data.cassandra.port=" + cassandra.getFirstMappedPort(), @@ -59,7 +59,7 @@ class CassandraDataAutoConfigurationIntegrationTests { } @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java index ef5f7bfd11..e9a3477a29 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java @@ -55,7 +55,7 @@ class CassandraDataAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfigurationTests.java index 6be09c34a8..739f4f0b30 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfigurationTests.java @@ -49,7 +49,7 @@ class CassandraReactiveDataAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataAutoConfigurationTests.java index 3b80f51aa3..a40ec2b76f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataAutoConfigurationTests.java @@ -58,7 +58,7 @@ class CouchbaseDataAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveAndImperativeRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveAndImperativeRepositoriesAutoConfigurationTests.java index c1c8a78aeb..dc3d1350fc 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveAndImperativeRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveAndImperativeRepositoriesAutoConfigurationTests.java @@ -50,7 +50,7 @@ class CouchbaseReactiveAndImperativeRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveDataAutoConfigurationTests.java index 7d559de5e5..28c1761980 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveDataAutoConfigurationTests.java @@ -58,7 +58,7 @@ class CouchbaseReactiveDataAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveRepositoriesAutoConfigurationTests.java index c05eaeaecd..b96018ccfd 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseReactiveRepositoriesAutoConfigurationTests.java @@ -46,7 +46,7 @@ class CouchbaseReactiveRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseRepositoriesAutoConfigurationTests.java index 745b22205c..2f77aa1e73 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseRepositoriesAutoConfigurationTests.java @@ -44,7 +44,7 @@ class CouchbaseRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfigurationTests.java index da823f5bb8..ffafbebcf2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfigurationTests.java @@ -51,12 +51,12 @@ class ElasticsearchAutoConfigurationTests { private AnnotationConfigApplicationContext context; @BeforeEach - public void setUp() { + void setUp() { System.setProperty("es.set.netty.runtime.available.processors", "false"); } @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfigurationTests.java index cfa2cda317..1a47f550c3 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfigurationTests.java @@ -56,12 +56,12 @@ class ElasticsearchDataAutoConfigurationTests { ReactiveRestClientAutoConfiguration.class, ElasticsearchDataAutoConfiguration.class)); @BeforeEach - public void setUp() { + void setUp() { System.setProperty("es.set.netty.runtime.available.processors", "false"); } @AfterEach - public void tearDown() { + void tearDown() { System.clearProperty("es.set.netty.runtime.available.processors"); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java index 215803cc5f..118e51506d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java @@ -46,7 +46,7 @@ class JpaWebAutoConfigurationTests { private AnnotationConfigServletWebApplicationContext context; @AfterEach - public void close() { + void close() { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/ldap/LdapRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/ldap/LdapRepositoriesAutoConfigurationTests.java index 481eee8e9f..0e16bf9eb4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/ldap/LdapRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/ldap/LdapRepositoriesAutoConfigurationTests.java @@ -43,7 +43,7 @@ class LdapRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MixedMongoRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MixedMongoRepositoriesAutoConfigurationTests.java index be56f776ff..52208f3e84 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MixedMongoRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MixedMongoRepositoriesAutoConfigurationTests.java @@ -55,7 +55,7 @@ class MixedMongoRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveAndBlockingRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveAndBlockingRepositoriesAutoConfigurationTests.java index b44da144d0..3ddcaa615f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveAndBlockingRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveAndBlockingRepositoriesAutoConfigurationTests.java @@ -50,7 +50,7 @@ class MongoReactiveAndBlockingRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java index 765abe7703..bbe8d220f4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java @@ -54,7 +54,7 @@ class MixedNeo4jRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java index 3cfac8d0ab..3435946503 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java @@ -42,7 +42,7 @@ class Neo4jPropertiesTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java index 630f53ce48..f6b7ce21ae 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java @@ -50,7 +50,7 @@ class Neo4jRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisRepositoriesAutoConfigurationTests.java index d120736c5d..dcb4901001 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisRepositoriesAutoConfigurationTests.java @@ -50,12 +50,12 @@ class RedisRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); @BeforeEach - public void setUp() { + void setUp() { TestPropertyValues.of("spring.redis.port=" + redis.getFirstMappedPort()).applyTo(this.context.getEnvironment()); } @AfterEach - public void close() { + void close() { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java index c80c6a8d15..297772a2f5 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java @@ -58,7 +58,7 @@ class RepositoryRestMvcAutoConfigurationTests { private AnnotationConfigServletWebApplicationContext context; @AfterEach - public void tearDown() { + void tearDown() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfigurationTests.java index cabca98764..da4fe22a76 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfigurationTests.java @@ -47,7 +47,7 @@ class SolrRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/domain/EntityScanPackagesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/domain/EntityScanPackagesTests.java index 6ac233b271..9f30c1c7e4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/domain/EntityScanPackagesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/domain/EntityScanPackagesTests.java @@ -41,7 +41,7 @@ class EntityScanPackagesTests { private AnnotationConfigApplicationContext context; @AfterEach - public void cleanup() { + void cleanup() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationServletIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationServletIntegrationTests.java index 11418739de..a9b803ab7e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationServletIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationServletIntegrationTests.java @@ -60,7 +60,7 @@ class FreeMarkerAutoConfigurationServletIntegrationTests { private AnnotationConfigServletWebApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfigurationTests.java index 93ade47dd1..5e07731b9f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfigurationTests.java @@ -59,12 +59,12 @@ class GroovyTemplateAutoConfigurationTests { private AnnotationConfigServletWebApplicationContext context = new AnnotationConfigServletWebApplicationContext(); @BeforeEach - public void setupContext() { + void setupContext() { this.context.setServletContext(new MockServletContext()); } @AfterEach - public void close() { + void close() { LocaleContextHolder.resetLocaleContext(); if (this.context != null) { this.context.close(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationTests.java index 700f92415c..b35a12030d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationTests.java @@ -51,12 +51,12 @@ class H2ConsoleAutoConfigurationTests { private AnnotationConfigServletWebApplicationContext context = new AnnotationConfigServletWebApplicationContext(); @BeforeEach - public void setupContext() { + void setupContext() { this.context.setServletContext(new MockServletContext()); } @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hateoas/HypermediaAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hateoas/HypermediaAutoConfigurationTests.java index 9d111174ea..fb01614960 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hateoas/HypermediaAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hateoas/HypermediaAutoConfigurationTests.java @@ -57,7 +57,7 @@ class HypermediaAutoConfigurationTests { private AnnotationConfigServletWebApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/EmbeddedDataSourceConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/EmbeddedDataSourceConfigurationTests.java index 5ed596ee5c..43206559aa 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/EmbeddedDataSourceConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/EmbeddedDataSourceConfigurationTests.java @@ -41,7 +41,7 @@ class EmbeddedDataSourceConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void closeContext() { + void closeContext() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfigurationTests.java index 26ba9c978f..358b52ae4f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfigurationTests.java @@ -53,19 +53,19 @@ class JndiDataSourceAutoConfigurationTests { private AnnotationConfigApplicationContext context; @BeforeEach - public void setupJndi() { + void setupJndi() { this.initialContextFactory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY); System.setProperty(Context.INITIAL_CONTEXT_FACTORY, TestableInitialContextFactory.class.getName()); } @BeforeEach - public void setupThreadContextClassLoader() { + void setupThreadContextClassLoader() { this.threadContextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(new JndiPropertiesHidingClassLoader(getClass().getClassLoader())); } @AfterEach - public void close() { + void close() { TestableInitialContextFactory.clearAll(); if (this.initialContextFactory != null) { System.setProperty(Context.INITIAL_CONTEXT_FACTORY, this.initialContextFactory); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/TomcatDataSourceConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/TomcatDataSourceConfigurationTests.java index 23afb97cad..48bb34230b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/TomcatDataSourceConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/TomcatDataSourceConfigurationTests.java @@ -49,7 +49,7 @@ class TomcatDataSourceConfigurationTests { private final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); @BeforeEach - public void init() { + void init() { TestPropertyValues.of(PREFIX + "initialize:false").applyTo(this.context); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JndiConnectionFactoryAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JndiConnectionFactoryAutoConfigurationTests.java index 2ccfcd82d4..086836f7a3 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JndiConnectionFactoryAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JndiConnectionFactoryAutoConfigurationTests.java @@ -50,7 +50,7 @@ class JndiConnectionFactoryAutoConfigurationTests { private String initialContextFactory; @BeforeEach - public void setupJndi() { + void setupJndi() { this.initialContextFactory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY); System.setProperty(Context.INITIAL_CONTEXT_FACTORY, TestableInitialContextFactory.class.getName()); this.threadContextClassLoader = Thread.currentThread().getContextClassLoader(); @@ -58,7 +58,7 @@ class JndiConnectionFactoryAutoConfigurationTests { } @AfterEach - public void cleanUp() { + void cleanUp() { TestableInitialContextFactory.clearAll(); if (this.initialContextFactory != null) { System.setProperty(Context.INITIAL_CONTEXT_FACTORY, this.initialContextFactory); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java index 75d60c92d2..38321cc174 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java @@ -49,7 +49,7 @@ class JmxAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void tearDown() { + void tearDown() { if (this.context != null) { this.context.close(); if (this.context.getParent() != null) { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqPropertiesTests.java index 1419cb5cca..98d10be1db 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqPropertiesTests.java @@ -47,7 +47,7 @@ class JooqPropertiesTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationIntegrationTests.java index 91729fbdee..a6333617ed 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationIntegrationTests.java @@ -63,7 +63,7 @@ class KafkaAutoConfigurationIntegrationTests { } @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfigurationTests.java index 53193472f9..628d0cb5b5 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfigurationTests.java @@ -70,7 +70,7 @@ import static org.assertj.core.api.Assertions.contentOf; class LiquibaseAutoConfigurationTests { @BeforeEach - public void init() { + void init() { new LiquibaseServiceLocatorApplicationListener() .onApplicationEvent(new ApplicationStartingEvent(new SpringApplication(Object.class), new String[0])); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mail/MailSenderAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mail/MailSenderAutoConfigurationTests.java index ccfeb66afe..03d83d4714 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mail/MailSenderAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mail/MailSenderAutoConfigurationTests.java @@ -58,7 +58,7 @@ class MailSenderAutoConfigurationTests { private String initialContextFactory; @BeforeEach - public void setupJndi() { + void setupJndi() { this.initialContextFactory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY); System.setProperty(Context.INITIAL_CONTEXT_FACTORY, TestableInitialContextFactory.class.getName()); this.threadContextClassLoader = Thread.currentThread().getContextClassLoader(); @@ -66,7 +66,7 @@ class MailSenderAutoConfigurationTests { } @AfterEach - public void close() { + void close() { TestableInitialContextFactory.clearAll(); if (this.initialContextFactory != null) { System.setProperty(Context.INITIAL_CONTEXT_FACTORY, this.initialContextFactory); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java index f03f157d0a..0c993bad7a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java @@ -62,7 +62,7 @@ class EmbeddedMongoAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationServletIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationServletIntegrationTests.java index 34fc97fe02..52bf3e788a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationServletIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationServletIntegrationTests.java @@ -66,7 +66,7 @@ class MustacheAutoConfigurationServletIntegrationTests { private int port; @BeforeEach - public void init() { + void init() { this.port = this.context.getWebServer().getPort(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernatePropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernatePropertiesTests.java index 996c213455..b58da5f8d6 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernatePropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernatePropertiesTests.java @@ -54,7 +54,7 @@ class HibernatePropertiesTests { private Supplier ddlAutoSupplier; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityPropertiesTests.java index 09d9c0dd1d..91b839c081 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityPropertiesTests.java @@ -40,7 +40,7 @@ class SecurityPropertiesTests { private MapConfigurationPropertySource source = new MapConfigurationPropertySource(); @BeforeEach - public void setUp() { + void setUp() { this.binder = new Binder(this.source); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java index b02dd6e6ed..0bf8877d6e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java @@ -54,7 +54,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests { private MockWebServer server; @AfterEach - public void cleanup() throws Exception { + void cleanup() throws Exception { if (this.server != null) { this.server.shutdown(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerAutoConfigurationTests.java index 68f34729c7..c69ed122dd 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerAutoConfigurationTests.java @@ -74,7 +74,7 @@ class ReactiveOAuth2ResourceServerAutoConfigurationTests { private MockWebServer server; @AfterEach - public void cleanup() throws Exception { + void cleanup() throws Exception { if (this.server != null) { this.server.shutdown(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java index 51bbf84158..2597d3911f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java @@ -68,7 +68,7 @@ class OAuth2ResourceServerAutoConfigurationTests { private MockWebServer server; @AfterEach - public void cleanup() throws Exception { + void cleanup() throws Exception { if (this.server != null) { this.server.shutdown(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java index 81a814b352..629e37eb7a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java @@ -42,7 +42,7 @@ class SendGridAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProvidersTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProvidersTests.java index c85a761775..0dc8ac0f4e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProvidersTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProvidersTests.java @@ -57,7 +57,7 @@ class TemplateAvailabilityProvidersTests { private ResourceLoader resourceLoader; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.providers = new TemplateAvailabilityProviders(Collections.singleton(this.provider)); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfigurationTests.java index 1788eb62fa..c1e4443ace 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfigurationTests.java @@ -54,7 +54,7 @@ class TransactionAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void tearDown() { + void tearDown() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfigurationTests.java index 471259abde..fb14907c57 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfigurationTests.java @@ -76,7 +76,7 @@ class JtaAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void closeContext() { + void closeContext() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationTests.java index 1ed3a532b1..27d1fbb0f3 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationTests.java @@ -56,7 +56,7 @@ class ValidationAutoConfigurationTests { private AnnotationConfigApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ConditionalOnEnabledResourceChainTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ConditionalOnEnabledResourceChainTests.java index 3be8d8cbe0..ef9dc7e859 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ConditionalOnEnabledResourceChainTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ConditionalOnEnabledResourceChainTests.java @@ -36,7 +36,7 @@ class ConditionalOnEnabledResourceChainTests { private final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); @AfterEach - public void closeContext() { + void closeContext() { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizerTests.java index 13a2c22b6f..91373301c2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizerTests.java @@ -59,7 +59,7 @@ class JettyWebServerFactoryCustomizerTests { private JettyWebServerFactoryCustomizer customizer; @BeforeEach - public void setup() { + void setup() { this.environment = new MockEnvironment(); this.serverProperties = new ServerProperties(); ConfigurationPropertySources.attach(this.environment); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/NettyWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/NettyWebServerFactoryCustomizerTests.java index 12ec09ddd8..f044fca95a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/NettyWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/NettyWebServerFactoryCustomizerTests.java @@ -61,7 +61,7 @@ class NettyWebServerFactoryCustomizerTests { private ArgumentCaptor customizerCaptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.environment = new MockEnvironment(); this.serverProperties = new ServerProperties(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java index 9f07592896..b54ec16886 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java @@ -62,7 +62,7 @@ class TomcatWebServerFactoryCustomizerTests { private TomcatWebServerFactoryCustomizer customizer; @BeforeEach - public void setup() { + void setup() { this.environment = new MockEnvironment(); this.serverProperties = new ServerProperties(); ConfigurationPropertySources.attach(this.environment); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java index ee1942a70d..3d19ccaa5d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java @@ -61,7 +61,7 @@ class UndertowWebServerFactoryCustomizerTests { private UndertowWebServerFactoryCustomizer customizer; @BeforeEach - public void setup() { + void setup() { this.environment = new MockEnvironment(); this.serverProperties = new ServerProperties(); ConfigurationPropertySources.attach(this.environment); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryCustomizerTests.java index de8cffd628..e3c676f4fd 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryCustomizerTests.java @@ -41,7 +41,7 @@ class ReactiveWebServerFactoryCustomizerTests { private ReactiveWebServerFactoryCustomizer customizer; @BeforeEach - public void setup() { + void setup() { this.customizer = new ReactiveWebServerFactoryCustomizer(this.properties); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/FilterOrderingIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/FilterOrderingIntegrationTests.java index 70e7b1acac..ac11d57f3e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/FilterOrderingIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/FilterOrderingIntegrationTests.java @@ -59,7 +59,7 @@ class FilterOrderingIntegrationTests { private AnnotationConfigServletWebServerApplicationContext context; @AfterEach - public void cleanup() { + void cleanup() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/HttpEncodingAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/HttpEncodingAutoConfigurationTests.java index 7f9cc0f0f0..a543ebc820 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/HttpEncodingAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/HttpEncodingAutoConfigurationTests.java @@ -54,7 +54,7 @@ class HttpEncodingAutoConfigurationTests { private AnnotationConfigServletWebApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java index 1f1d73be9f..183e030987 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java @@ -66,7 +66,7 @@ class MultipartAutoConfigurationTests { private AnnotationConfigServletWebServerApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryCustomizerTests.java index 52973f1703..27f00d8ab7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryCustomizerTests.java @@ -54,7 +54,7 @@ class ServletWebServerFactoryCustomizerTests { private ServletWebServerFactoryCustomizer customizer; @BeforeEach - public void setup() { + void setup() { this.customizer = new ServletWebServerFactoryCustomizer(this.properties); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizerTests.java index 0636e68382..c3338ab1cb 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizerTests.java @@ -45,7 +45,7 @@ class TomcatServletWebServerFactoryCustomizerTests { private ServerProperties serverProperties; @BeforeEach - public void setup() { + void setup() { this.environment = new MockEnvironment(); this.serverProperties = new ServerProperties(); ConfigurationPropertySources.attach(this.environment); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerDirectMockMvcTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerDirectMockMvcTests.java index 8776f3cb81..8475645740 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerDirectMockMvcTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerDirectMockMvcTests.java @@ -68,7 +68,7 @@ class BasicErrorControllerDirectMockMvcTests { private MockMvc mockMvc; @AfterEach - public void close() { + void close() { ApplicationContextTestUtils.closeAll(this.wac); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java index 8460c70c8f..f11c0c4ec9 100755 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java @@ -76,7 +76,7 @@ class BasicErrorControllerIntegrationTests { private ConfigurableApplicationContext context; @AfterEach - public void closeContext() { + void closeContext() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerMockMvcTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerMockMvcTests.java index 1c2d3dc501..e41121d17b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerMockMvcTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerMockMvcTests.java @@ -78,7 +78,7 @@ class BasicErrorControllerMockMvcTests { private MockMvc mockMvc; @BeforeEach - public void setup() { + void setup() { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewIntegrationTests.java index e996ac961c..f44a2ef565 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewIntegrationTests.java @@ -61,7 +61,7 @@ class DefaultErrorViewIntegrationTests { private MockMvc mockMvc; @BeforeEach - public void setup() { + void setup() { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolverTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolverTests.java index d63d8c03f0..60d93695e1 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolverTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolverTests.java @@ -70,7 +70,7 @@ class DefaultErrorViewResolverTests { private HttpServletRequest request = new MockHttpServletRequest(); @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(); applicationContext.refresh(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketMessagingAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketMessagingAutoConfigurationTests.java index 2d81cd82a3..d1645c0717 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketMessagingAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketMessagingAutoConfigurationTests.java @@ -83,7 +83,7 @@ class WebSocketMessagingAutoConfigurationTests { private SockJsClient sockJsClient; @BeforeEach - public void setup() { + void setup() { List transports = Arrays.asList( new WebSocketTransport(new StandardWebSocketClient(new WsWebSocketContainer())), new RestTemplateXhrTransport(new RestTemplate())); @@ -91,7 +91,7 @@ class WebSocketMessagingAutoConfigurationTests { } @AfterEach - public void tearDown() { + void tearDown() { this.context.close(); this.sockJsClient.stop(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfigurationTests.java index 7052e25cb5..1c8b8b5d22 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfigurationTests.java @@ -42,12 +42,12 @@ class WebSocketServletAutoConfigurationTests { private AnnotationConfigServletWebServerApplicationContext context; @BeforeEach - public void createContext() { + void createContext() { this.context = new AnnotationConfigServletWebServerApplicationContext(); } @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/CommandLineIT.java b/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/CommandLineIT.java index 8f17a7a5d2..c98970b269 100644 --- a/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/CommandLineIT.java +++ b/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/CommandLineIT.java @@ -39,7 +39,7 @@ class CommandLineIT { private CommandLineInvoker cli; @BeforeEach - public void setup(@TempDir File tempDir) { + void setup(@TempDir File tempDir) { this.cli = new CommandLineInvoker(tempDir); } diff --git a/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/JarCommandIT.java b/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/JarCommandIT.java index 6c2d4b5f2e..255b91d5de 100644 --- a/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/JarCommandIT.java +++ b/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/JarCommandIT.java @@ -45,7 +45,7 @@ class JarCommandIT { private File tempDir; @BeforeEach - public void setup(@TempDir File tempDir) { + void setup(@TempDir File tempDir) { this.cli = new CommandLineInvoker(new File("src/it/resources/jar-command"), tempDir); this.tempDir = tempDir; diff --git a/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/WarCommandIT.java b/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/WarCommandIT.java index 7ae9e238da..0554fff7d9 100644 --- a/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/WarCommandIT.java +++ b/spring-boot-project/spring-boot-cli/src/it/java/org/springframework/boot/cli/WarCommandIT.java @@ -42,7 +42,7 @@ class WarCommandIT { private File tempDir; @BeforeEach - public void setup(@TempDir File tempDir) { + void setup(@TempDir File tempDir) { this.cli = new CommandLineInvoker(new File("src/it/resources/war-command"), tempDir); this.tempDir = tempDir; diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/GrabCommandIntegrationTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/GrabCommandIntegrationTests.java index f45127bec6..559185fa08 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/GrabCommandIntegrationTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/GrabCommandIntegrationTests.java @@ -50,7 +50,7 @@ class GrabCommandIntegrationTests { @BeforeEach @AfterEach - public void deleteLocalRepository() { + void deleteLocalRepository() { System.clearProperty("grape.root"); System.clearProperty("groovy.grape.report.downloads"); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/RunCommandIntegrationTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/RunCommandIntegrationTests.java index 16e5798fea..c4afcbd8b6 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/RunCommandIntegrationTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/RunCommandIntegrationTests.java @@ -48,12 +48,12 @@ class RunCommandIntegrationTests { private Properties systemProperties = new Properties(); @BeforeEach - public void captureSystemProperties() { + void captureSystemProperties() { this.systemProperties.putAll(System.getProperties()); } @AfterEach - public void restoreSystemProperties() { + void restoreSystemProperties() { System.setProperties(this.systemProperties); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/app/SpringApplicationLauncherTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/app/SpringApplicationLauncherTests.java index c431d22a66..a912195316 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/app/SpringApplicationLauncherTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/app/SpringApplicationLauncherTests.java @@ -36,7 +36,7 @@ class SpringApplicationLauncherTests { private Map env = new HashMap<>(); @AfterEach - public void cleanUp() { + void cleanUp() { System.clearProperty("spring.application.class.name"); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/CommandRunnerTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/CommandRunnerTests.java index 2651ebc44b..c91049a6c1 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/CommandRunnerTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/CommandRunnerTests.java @@ -55,13 +55,13 @@ class CommandRunnerTests { private ClassLoader loader; @AfterEach - public void close() { + void close() { Thread.currentThread().setContextClassLoader(this.loader); System.clearProperty("debug"); } @BeforeEach - public void setup() { + void setup() { this.loader = Thread.currentThread().getContextClassLoader(); MockitoAnnotations.initMocks(this); this.commandRunner = new CommandRunner("spring") { diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/encodepassword/EncodePasswordCommandTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/encodepassword/EncodePasswordCommandTests.java index c634b801b9..4775330b11 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/encodepassword/EncodePasswordCommandTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/encodepassword/EncodePasswordCommandTests.java @@ -45,13 +45,13 @@ class EncodePasswordCommandTests { private ArgumentCaptor message; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.log = MockLog.attach(); } @AfterEach - public void cleanup() { + void cleanup() { MockLog.clear(); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java index ac6e3bb09a..bf1ba394e6 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java @@ -55,7 +55,7 @@ class InitCommandTests extends AbstractHttpClientMockTests { private ArgumentCaptor requestCaptor; @BeforeEach - public void setupMocks() { + void setupMocks() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/GroovyGrabDependencyResolverTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/GroovyGrabDependencyResolverTests.java index 42f22a7be4..16f5217cde 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/GroovyGrabDependencyResolverTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/GroovyGrabDependencyResolverTests.java @@ -47,7 +47,7 @@ class GroovyGrabDependencyResolverTests { private DependencyResolver resolver; @BeforeEach - public void setupResolver() { + void setupResolver() { GroovyCompilerConfiguration configuration = new GroovyCompilerConfiguration() { @Override diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/InstallerTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/InstallerTests.java index c47ba96400..cdca50d0c8 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/InstallerTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/InstallerTests.java @@ -46,13 +46,13 @@ class InstallerTests { private Installer installer; @BeforeEach - public void setUp() throws IOException { + void setUp() throws IOException { System.setProperty("spring.home", this.tempDir.getAbsolutePath()); this.installer = new Installer(this.resolver); } @AfterEach - public void cleanUp() { + void cleanUp() { System.clearProperty("spring.home"); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/DependencyCustomizerTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/DependencyCustomizerTests.java index fae77e6994..f5f17ee5a5 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/DependencyCustomizerTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/DependencyCustomizerTests.java @@ -53,7 +53,7 @@ class DependencyCustomizerTests { private DependencyCustomizer dependencyCustomizer; @BeforeEach - public void setUp() { + void setUp() { MockitoAnnotations.initMocks(this); given(this.resolver.getGroupId("spring-boot-starter-logging")).willReturn("org.springframework.boot"); given(this.resolver.getArtifactId("spring-boot-starter-logging")).willReturn("spring-boot-starter-logging"); diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/ResolveDependencyCoordinatesTransformationTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/ResolveDependencyCoordinatesTransformationTests.java index 7fb6e1d959..523f375251 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/ResolveDependencyCoordinatesTransformationTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/ResolveDependencyCoordinatesTransformationTests.java @@ -82,7 +82,7 @@ final class ResolveDependencyCoordinatesTransformationTests { this.resolutionContext); @BeforeEach - public void setUpExpectations() { + void setUpExpectations() { given(this.coordinatesResolver.getGroupId("spring-core")).willReturn("org.springframework"); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/dependencies/CompositeDependencyManagementTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/dependencies/CompositeDependencyManagementTests.java index 4b57f7647c..504726403f 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/dependencies/CompositeDependencyManagementTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/dependencies/CompositeDependencyManagementTests.java @@ -40,7 +40,7 @@ class CompositeDependencyManagementTests { private DependencyManagement dependencyManagement2; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/dependencies/DependencyManagementArtifactCoordinatesResolverTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/dependencies/DependencyManagementArtifactCoordinatesResolverTests.java index c4bc9f5b99..b47e18ff27 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/dependencies/DependencyManagementArtifactCoordinatesResolverTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/dependencies/DependencyManagementArtifactCoordinatesResolverTests.java @@ -39,7 +39,7 @@ class DependencyManagementArtifactCoordinatesResolverTests { private DependencyManagementArtifactCoordinatesResolver resolver; @BeforeEach - public void setup() { + void setup() { this.dependencyManagement = mock(DependencyManagement.class); given(this.dependencyManagement.find("a1")).willReturn(new Dependency("g1", "a1", "0")); given(this.dependencyManagement.getSpringBootVersion()).willReturn("1"); diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/DetailedProgressReporterTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/DetailedProgressReporterTests.java index c3b2c08ce0..0ecfb31e80 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/DetailedProgressReporterTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/DetailedProgressReporterTests.java @@ -48,7 +48,7 @@ final class DetailedProgressReporterTests { private final DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(); @BeforeEach - public void initialize() { + void initialize() { new DetailedProgressReporter(this.session, this.out); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/GrapeRootRepositorySystemSessionAutoConfigurationTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/GrapeRootRepositorySystemSessionAutoConfigurationTests.java index f7ca1d939a..b2d6924baf 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/GrapeRootRepositorySystemSessionAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/GrapeRootRepositorySystemSessionAutoConfigurationTests.java @@ -52,7 +52,7 @@ class GrapeRootRepositorySystemSessionAutoConfigurationTests { private RepositorySystem repositorySystem; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java index 3b644dc2f9..bd579d794b 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java @@ -50,7 +50,7 @@ class SettingsXmlRepositorySystemSessionAutoConfigurationTests { private RepositorySystem repositorySystem; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/RemoteUrlPropertyExtractorTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/RemoteUrlPropertyExtractorTests.java index c2a9407de8..3219bf72b4 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/RemoteUrlPropertyExtractorTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/RemoteUrlPropertyExtractorTests.java @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; class RemoteUrlPropertyExtractorTests { @AfterEach - public void preventRunFailuresFromPollutingLoggerContext() { + void preventRunFailuresFromPollutingLoggerContext() { ((Logger) LoggerFactory.getLogger(RemoteUrlPropertyExtractorTests.class)).getLoggerContext() .getTurboFilterList().clear(); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsPooledDataSourceAutoConfigurationTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsPooledDataSourceAutoConfigurationTests.java index 9ebf3daf50..99c1fde9ab 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsPooledDataSourceAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsPooledDataSourceAutoConfigurationTests.java @@ -50,12 +50,12 @@ import static org.mockito.Mockito.verify; class DevToolsPooledDataSourceAutoConfigurationTests extends AbstractDevToolsDataSourceAutoConfigurationTests { @BeforeEach - public void before(@TempDir File tempDir) throws IOException { + void before(@TempDir File tempDir) throws IOException { System.setProperty("derby.stream.error.file", new File(tempDir, "derby.log").getAbsolutePath()); } @AfterEach - public void after() { + void after() { System.clearProperty("derby.stream.error.file"); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java index bd289bb678..2a4b45e930 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java @@ -77,7 +77,7 @@ class LocalDevToolsAutoConfigurationTests { private ConfigurableApplicationContext context; @AfterEach - public void cleanup() { + void cleanup() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/OnEnabledDevToolsConditionTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/OnEnabledDevToolsConditionTests.java index f4905c9962..067fe3e66b 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/OnEnabledDevToolsConditionTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/OnEnabledDevToolsConditionTests.java @@ -38,7 +38,7 @@ class OnEnabledDevToolsConditionTests { private AnnotationConfigApplicationContext context; @BeforeEach - public void setup() { + void setup() { this.context = new AnnotationConfigApplicationContext(); this.context.register(TestConfiguration.class); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfigurationTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfigurationTests.java index 0232f943e6..1c386ae23b 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfigurationTests.java @@ -68,14 +68,14 @@ class RemoteDevToolsAutoConfigurationTests { private MockFilterChain chain; @BeforeEach - public void setup() { + void setup() { this.request = new MockHttpServletRequest(); this.response = new MockHttpServletResponse(); this.chain = new MockFilterChain(); } @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/classpath/ClassPathFileChangeListenerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/classpath/ClassPathFileChangeListenerTests.java index 48d492c739..c6772b9892 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/classpath/ClassPathFileChangeListenerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/classpath/ClassPathFileChangeListenerTests.java @@ -60,7 +60,7 @@ class ClassPathFileChangeListenerTests { private ArgumentCaptor eventCaptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java index f932950303..7cc5eeeb89 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java @@ -50,12 +50,12 @@ class DevToolPropertiesIntegrationTests { private ConfigurableApplicationContext context; @BeforeEach - public void setup() { + void setup() { Restarter.initialize(new String[] {}, false, new MockInitializer(), false); } @AfterEach - public void cleanup() { + void cleanup() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessorTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessorTests.java index 75b13648e6..d7f74ea938 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessorTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessorTests.java @@ -42,7 +42,7 @@ class DevToolsHomePropertiesPostProcessorTests { private File home; @BeforeEach - public void setup(@TempDir File tempDir) throws IOException { + void setup(@TempDir File tempDir) throws IOException { this.home = tempDir; } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java index bce652e6f4..f698822000 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java @@ -55,7 +55,7 @@ class FileSystemWatcherTests { File tempDir; @BeforeEach - public void setup() { + void setup() { setupWatcher(20, 10); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FolderSnapshotTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FolderSnapshotTests.java index 44a7a79051..efcd80a4c8 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FolderSnapshotTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FolderSnapshotTests.java @@ -45,7 +45,7 @@ class FolderSnapshotTests { private FolderSnapshot initialSnapshot; @BeforeEach - public void setup() throws Exception { + void setup() throws Exception { this.folder = createTestFolderStructure(); this.initialSnapshot = new FolderSnapshot(this.folder); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java index 25f74aed37..242b190c5b 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java @@ -60,13 +60,13 @@ class LiveReloadServerTests { private MonitoredLiveReloadServer server; @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { this.server = new MonitoredLiveReloadServer(0); this.port = this.server.start(); } @AfterEach - public void tearDown() throws Exception { + void tearDown() throws Exception { this.server.stop(); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/ClassPathChangeUploaderTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/ClassPathChangeUploaderTests.java index ff056bc822..2cd777db7f 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/ClassPathChangeUploaderTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/ClassPathChangeUploaderTests.java @@ -59,7 +59,7 @@ class ClassPathChangeUploaderTests { private ClassPathChangeUploader uploader; @BeforeEach - public void setup() { + void setup() { this.requestFactory = new MockClientHttpRequestFactory(); this.uploader = new ClassPathChangeUploader("http://localhost/upload", this.requestFactory); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/DelayedLiveReloadTriggerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/DelayedLiveReloadTriggerTests.java index a6237130b1..d6473a8dd7 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/DelayedLiveReloadTriggerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/DelayedLiveReloadTriggerTests.java @@ -67,7 +67,7 @@ class DelayedLiveReloadTriggerTests { private DelayedLiveReloadTrigger trigger; @BeforeEach - public void setup() throws IOException { + void setup() throws IOException { MockitoAnnotations.initMocks(this); given(this.errorRequest.execute()).willReturn(this.errorResponse); given(this.okRequest.execute()).willReturn(this.okResponse); diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/HttpHeaderInterceptorTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/HttpHeaderInterceptorTests.java index 58692c5a9a..bf2def343f 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/HttpHeaderInterceptorTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/HttpHeaderInterceptorTests.java @@ -60,7 +60,7 @@ class HttpHeaderInterceptorTests { private MockHttpServletRequest httpRequest; @BeforeEach - public void setup() throws Exception { + void setup() throws Exception { MockitoAnnotations.initMocks(this); this.body = new byte[] {}; this.httpRequest = new MockHttpServletRequest(); diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/RemoteClientConfigurationTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/RemoteClientConfigurationTests.java index 6e2fa3db7e..78f60efd80 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/RemoteClientConfigurationTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/RemoteClientConfigurationTests.java @@ -68,7 +68,7 @@ class RemoteClientConfigurationTests { private AnnotationConfigApplicationContext clientContext; @AfterEach - public void cleanup() { + void cleanup() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherFilterTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherFilterTests.java index 16ca385136..112a58715c 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherFilterTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherFilterTests.java @@ -66,7 +66,7 @@ class DispatcherFilterTests { private DispatcherFilter filter; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.filter = new DispatcherFilter(this.dispatcher); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherTests.java index 1d7fd8aaf2..3a4ed8db05 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherTests.java @@ -63,7 +63,7 @@ class DispatcherTests { private ServerHttpResponse serverResponse; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.request = new MockHttpServletRequest(); this.response = new MockHttpServletResponse(); diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpHeaderAccessManagerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpHeaderAccessManagerTests.java index c0bd058ae2..a55c836139 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpHeaderAccessManagerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpHeaderAccessManagerTests.java @@ -45,7 +45,7 @@ class HttpHeaderAccessManagerTests { private HttpHeaderAccessManager manager; @BeforeEach - public void setup() { + void setup() { this.request = new MockHttpServletRequest("GET", "/"); this.serverRequest = new ServletServerHttpRequest(this.request); this.manager = new HttpHeaderAccessManager(HEADER, SECRET); diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpStatusHandlerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpStatusHandlerTests.java index 580a412eed..59ae3a8963 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpStatusHandlerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpStatusHandlerTests.java @@ -46,7 +46,7 @@ class HttpStatusHandlerTests { private ServerHttpRequest request; @BeforeEach - public void setup() { + void setup() { this.servletRequest = new MockHttpServletRequest(); this.servletResponse = new MockHttpServletResponse(); this.request = new ServletServerHttpRequest(this.servletRequest); diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/ClassLoaderFilesResourcePatternResolverTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/ClassLoaderFilesResourcePatternResolverTests.java index 52efd3b941..964c22b7f9 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/ClassLoaderFilesResourcePatternResolverTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/ClassLoaderFilesResourcePatternResolverTests.java @@ -58,7 +58,7 @@ class ClassLoaderFilesResourcePatternResolverTests { private ClassLoaderFilesResourcePatternResolver resolver; @BeforeEach - public void setup() { + void setup() { this.files = new ClassLoaderFiles(); this.resolver = new ClassLoaderFilesResourcePatternResolver(new GenericApplicationContext(), this.files); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/MainMethodTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/MainMethodTests.java index d5e0a47db4..5ca4220a51 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/MainMethodTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/MainMethodTests.java @@ -39,7 +39,7 @@ class MainMethodTests { private Method actualMain; @BeforeEach - public void setup() throws Exception { + void setup() throws Exception { this.actualMain = Valid.class.getMethod("main", String[].class); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/OnInitializedRestarterConditionTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/OnInitializedRestarterConditionTests.java index 5a7fca44d2..8276cebea9 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/OnInitializedRestarterConditionTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/OnInitializedRestarterConditionTests.java @@ -43,7 +43,7 @@ class OnInitializedRestarterConditionTests { @BeforeEach @AfterEach - public void cleanup() { + void cleanup() { Restarter.clearInstance(); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java index a4d4ae3f30..6ad95b16f1 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java @@ -53,7 +53,7 @@ class RestartApplicationListenerTests { @BeforeEach @AfterEach - public void cleanup() { + void cleanup() { Restarter.clearInstance(); System.clearProperty(ENABLED_PROPERTY); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java index b29a3d91e3..4b86fd8fd4 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java @@ -59,12 +59,12 @@ import static org.mockito.Mockito.verifyZeroInteractions; class RestarterTests { @BeforeEach - public void setup() { + void setup() { RestarterInitializer.setRestarterInstance(); } @AfterEach - public void cleanup() { + void cleanup() { Restarter.clearInstance(); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoaderTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoaderTests.java index f54914cd2c..509eececfc 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoaderTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoaderTests.java @@ -63,7 +63,7 @@ class RestartClassLoaderTests { private RestartClassLoader reloadClassLoader; @BeforeEach - public void setup(@TempDir File tempDir) throws Exception { + void setup(@TempDir File tempDir) throws Exception { this.sampleJarFile = createSampleJarFile(tempDir); URL url = this.sampleJarFile.toURI().toURL(); ClassLoader classLoader = getClass().getClassLoader(); @@ -74,7 +74,7 @@ class RestartClassLoaderTests { } @AfterEach - public void tearDown() throws Exception { + void tearDown() throws Exception { this.reloadClassLoader.close(); this.parentClassLoader.close(); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/HttpRestartServerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/HttpRestartServerTests.java index c72cbb94df..ef9eb19449 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/HttpRestartServerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/HttpRestartServerTests.java @@ -56,7 +56,7 @@ class HttpRestartServerTests { private ArgumentCaptor filesCaptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.server = new HttpRestartServer(this.delegate); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnectionTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnectionTests.java index 89bd6bdec6..153b8b92df 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnectionTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnectionTests.java @@ -65,7 +65,7 @@ class HttpTunnelConnectionTests { private MockClientHttpRequestFactory requestFactory = new MockClientHttpRequestFactory(); @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.url = "http://localhost:12345"; this.incomingData = new ByteArrayOutputStream(); diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/HttpTunnelServerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/HttpTunnelServerTests.java index 941944230b..973dccb95d 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/HttpTunnelServerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/HttpTunnelServerTests.java @@ -81,7 +81,7 @@ class HttpTunnelServerTests { private MockServerChannel serverChannel; @BeforeEach - public void setup() throws Exception { + void setup() throws Exception { MockitoAnnotations.initMocks(this); this.server = new HttpTunnelServer(this.serverConnection); given(this.serverConnection.open(anyInt())).willAnswer((invocation) -> { diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/SocketTargetServerConnectionTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/SocketTargetServerConnectionTests.java index 2a5c3a04a1..25edddcf0d 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/SocketTargetServerConnectionTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/SocketTargetServerConnectionTests.java @@ -44,7 +44,7 @@ class SocketTargetServerConnectionTests { private SocketTargetServerConnection connection; @BeforeEach - public void setup() throws IOException { + void setup() throws IOException { this.server = new MockServer(); this.connection = new SocketTargetServerConnection(() -> this.server.getPort()); } diff --git a/spring-boot-project/spring-boot-properties-migrator/src/test/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationListenerTests.java b/spring-boot-project/spring-boot-properties-migrator/src/test/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationListenerTests.java index 3331d57123..a4bf69dfb4 100644 --- a/spring-boot-project/spring-boot-properties-migrator/src/test/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationListenerTests.java +++ b/spring-boot-project/spring-boot-properties-migrator/src/test/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationListenerTests.java @@ -39,7 +39,7 @@ class PropertiesMigrationListenerTests { private ConfigurableApplicationContext context; @AfterEach - public void closeContext() { + void closeContext() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManagerTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManagerTests.java index 848ea27065..15154b0cc3 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManagerTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManagerTests.java @@ -53,7 +53,7 @@ class TestEntityManagerTests { private TestEntityManager testEntityManager; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.testEntityManager = new TestEntityManager(this.entityManagerFactory); given(this.entityManagerFactory.getPersistenceUnitUtil()).willReturn(this.persistenceUnitUtil); diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/MockMvcRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/MockMvcRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java index 66193f97ba..2926a2017e 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/MockMvcRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/MockMvcRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java @@ -62,7 +62,7 @@ class MockMvcRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests { private File generatedSnippets; @BeforeEach - public void deleteSnippets() { + void deleteSnippets() { this.generatedSnippets = new File(new BuildOutput(getClass()).getRootLocation(), "generated-snippets"); FileSystemUtils.deleteRecursively(this.generatedSnippets); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/MockMvcRestDocsAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/MockMvcRestDocsAutoConfigurationIntegrationTests.java index c7edfdc989..94523a8f65 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/MockMvcRestDocsAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/MockMvcRestDocsAutoConfigurationIntegrationTests.java @@ -47,7 +47,7 @@ class MockMvcRestDocsAutoConfigurationIntegrationTests { private File generatedSnippets; @BeforeEach - public void deleteSnippets() { + void deleteSnippets() { this.generatedSnippets = new File(new BuildOutput(getClass()).getRootLocation(), "generated-snippets"); FileSystemUtils.deleteRecursively(this.generatedSnippets); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java index 4bd39cb3c1..17abc4d589 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java @@ -63,7 +63,7 @@ class RestAssuredRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests private File generatedSnippets; @BeforeEach - public void deleteSnippets() { + void deleteSnippets() { this.generatedSnippets = new File(new BuildOutput(getClass()).getRootLocation(), "generated-snippets"); FileSystemUtils.deleteRecursively(this.generatedSnippets); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationIntegrationTests.java index 5ed7089f3a..e61c5eac13 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationIntegrationTests.java @@ -55,7 +55,7 @@ class RestAssuredRestDocsAutoConfigurationIntegrationTests { private File generatedSnippets; @BeforeEach - public void deleteSnippets() { + void deleteSnippets() { this.generatedSnippets = new File(new BuildOutput(getClass()).getRootLocation(), "generated-snippets"); FileSystemUtils.deleteRecursively(this.generatedSnippets); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/WebTestClientRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/WebTestClientRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java index bfe06a7374..44b8e9aa67 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/WebTestClientRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/WebTestClientRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java @@ -55,7 +55,7 @@ class WebTestClientRestDocsAutoConfigurationAdvancedConfigurationIntegrationTest private File generatedSnippets; @BeforeEach - public void deleteSnippets() { + void deleteSnippets() { this.generatedSnippets = new File(new BuildOutput(getClass()).getRootLocation(), "generated-snippets"); FileSystemUtils.deleteRecursively(this.generatedSnippets); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/WebTestClientRestDocsAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/WebTestClientRestDocsAutoConfigurationIntegrationTests.java index d29b1809d9..979455ffbe 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/WebTestClientRestDocsAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/WebTestClientRestDocsAutoConfigurationIntegrationTests.java @@ -48,7 +48,7 @@ class WebTestClientRestDocsAutoConfigurationIntegrationTests { private File generatedSnippets; @BeforeEach - public void deleteSnippets() { + void deleteSnippets() { this.generatedSnippets = new File(new BuildOutput(getClass()).getRootLocation(), "generated-snippets"); FileSystemUtils.deleteRecursively(this.generatedSnippets); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderMockMvcTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderMockMvcTests.java index 510bad39db..92f64272f9 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderMockMvcTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderMockMvcTests.java @@ -61,7 +61,7 @@ class SpringBootContextLoaderMockMvcTests { private MockMvc mvc; @BeforeEach - public void setUp() { + void setUp() { this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build(); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertProviderTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertProviderTests.java index d5a651ebbe..3be6dd8f92 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertProviderTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertProviderTests.java @@ -50,7 +50,7 @@ class ApplicationContextAssertProviderTests { private Supplier startupFailureSupplier; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.startupFailure = new RuntimeException(); this.mockContextSupplier = () -> this.mockContext; diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java index 8fa6ca0e21..783e93d672 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java @@ -47,14 +47,14 @@ class ApplicationContextAssertTests { private RuntimeException failure = new RuntimeException(); @BeforeEach - public void setup() { + void setup() { this.parent = new StaticApplicationContext(); this.context = new StaticApplicationContext(); this.context.setParent(this.parent); } @AfterEach - public void cleanup() { + void cleanup() { this.context.close(); this.parent.close(); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/GsonTesterIntegrationTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/GsonTesterIntegrationTests.java index c4286b6afd..d007b5ff1e 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/GsonTesterIntegrationTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/GsonTesterIntegrationTests.java @@ -47,7 +47,7 @@ class GsonTesterIntegrationTests { private static final String JSON = "{\"name\":\"Spring\",\"age\":123}"; @BeforeEach - public void setup() { + void setup() { this.gson = new Gson(); GsonTester.initFields(this, this.gson); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JacksonTesterIntegrationTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JacksonTesterIntegrationTests.java index 5e55813562..708c46efb5 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JacksonTesterIntegrationTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JacksonTesterIntegrationTests.java @@ -55,7 +55,7 @@ class JacksonTesterIntegrationTests { private static final String JSON = "{\"name\":\"Spring\",\"age\":123}"; @BeforeEach - public void setup() { + void setup() { this.objectMapper = new ObjectMapper(); JacksonTester.initFields(this, this.objectMapper); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JsonContentAssertTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JsonContentAssertTests.java index 9cd5082a5e..03f5edba3e 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JsonContentAssertTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/JsonContentAssertTests.java @@ -66,7 +66,7 @@ class JsonContentAssertTests { private File temp; @BeforeEach - public void setup() { + void setup() { this.temp = new File(this.tempDir.toFile(), "file.json"); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerFactoryTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerFactoryTests.java index bb796fd2df..5077b7e367 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerFactoryTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerFactoryTests.java @@ -34,7 +34,7 @@ class MockitoContextCustomizerFactoryTests { private final MockitoContextCustomizerFactory factory = new MockitoContextCustomizerFactory(); @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoTestExecutionListenerTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoTestExecutionListenerTests.java index db2327de28..70677b568d 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoTestExecutionListenerTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoTestExecutionListenerTests.java @@ -57,7 +57,7 @@ class MockitoTestExecutionListenerTests { private ArgumentCaptor fieldCaptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); given(this.applicationContext.getBean(MockitoPostProcessor.class)).willReturn(this.postProcessor); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/QualifierDefinitionTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/QualifierDefinitionTests.java index dcf00a5040..f8ba8b2cb4 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/QualifierDefinitionTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/QualifierDefinitionTests.java @@ -52,7 +52,7 @@ class QualifierDefinitionTests { private ArgumentCaptor descriptorCaptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/SpringBootTestRandomPortEnvironmentPostProcessorTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/SpringBootTestRandomPortEnvironmentPostProcessorTests.java index aa6d026995..e2e36f15d8 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/SpringBootTestRandomPortEnvironmentPostProcessorTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/SpringBootTestRandomPortEnvironmentPostProcessorTests.java @@ -45,7 +45,7 @@ class SpringBootTestRandomPortEnvironmentPostProcessorTests { private MutablePropertySources propertySources; @BeforeEach - public void setup() { + void setup() { this.environment = new MockEnvironment(); this.propertySources = this.environment.getPropertySources(); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizerTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizerTests.java index 89697f17c9..af6bf7215d 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizerTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizerTests.java @@ -41,7 +41,7 @@ class MockServerRestTemplateCustomizerTests { private MockServerRestTemplateCustomizer customizer; @BeforeEach - public void setup() { + void setup() { this.customizer = new MockServerRestTemplateCustomizer(); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManagerTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManagerTests.java index 06ed862fe4..8b3a6aca38 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManagerTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManagerTests.java @@ -62,7 +62,7 @@ class RootUriRequestExpectationManagerTests { private ArgumentCaptor requestCaptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.manager = new RootUriRequestExpectationManager(this.uri, this.delegate); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java b/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java index 8272c99875..59d5138721 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java @@ -43,7 +43,7 @@ class AutoConfigureAnnotationProcessorTests { private TestCompiler compiler; @BeforeEach - public void createCompiler() throws IOException { + void createCompiler() throws IOException { this.compiler = new TestCompiler(this.tempDir); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/AbstractMetadataGenerationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/AbstractMetadataGenerationTests.java index 5637142e3d..1af2311b2a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/AbstractMetadataGenerationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/AbstractMetadataGenerationTests.java @@ -39,7 +39,7 @@ public abstract class AbstractMetadataGenerationTests { private TestCompiler compiler; @BeforeEach - public void createCompiler() throws IOException { + void createCompiler() throws IOException { this.compiler = new TestCompiler(this.tempDir); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/LaunchScriptConfigurationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/LaunchScriptConfigurationTests.java index 9085a37bca..bbff7099e9 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/LaunchScriptConfigurationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/LaunchScriptConfigurationTests.java @@ -37,7 +37,7 @@ class LaunchScriptConfigurationTests { private final Project project = mock(Project.class); @BeforeEach - public void setUp() { + void setUp() { given(this.task.getProject()).willReturn(this.project); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/FileUtilsTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/FileUtilsTests.java index a3ca9de31d..e24c84e159 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/FileUtilsTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/FileUtilsTests.java @@ -43,7 +43,7 @@ class FileUtilsTests { private File originDirectory; @BeforeEach - public void init() throws IOException { + void init() throws IOException { this.outputDirectory = new File(this.tempDir, "remove"); this.originDirectory = new File(this.tempDir, "keep"); this.outputDirectory.mkdirs(); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/MainClassFinderTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/MainClassFinderTests.java index 01013907ef..cd7d9878c1 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/MainClassFinderTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/MainClassFinderTests.java @@ -45,7 +45,7 @@ class MainClassFinderTests { private TestJarFile testJarFile; @BeforeEach - public void setup(@TempDir File tempDir) throws IOException { + void setup(@TempDir File tempDir) throws IOException { this.testJarFile = new TestJarFile(tempDir); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java index 14fda1bdbf..c649b65673 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java @@ -84,7 +84,7 @@ class RepackagerTests { private TestJarFile testJarFile; @BeforeEach - public void setup() throws IOException { + void setup() throws IOException { this.testJarFile = new TestJarFile(this.tempDir); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java index 6d05d9f641..a5631f9fef 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java @@ -62,14 +62,14 @@ class PropertiesLauncherTests { private CapturedOutput capturedOutput; @BeforeEach - public void setup(CapturedOutput capturedOutput) { + void setup(CapturedOutput capturedOutput) { this.contextClassLoader = Thread.currentThread().getContextClassLoader(); System.setProperty("loader.home", new File("src/test/resources").getAbsolutePath()); this.capturedOutput = capturedOutput; } @AfterEach - public void close() { + void close() { Thread.currentThread().setContextClassLoader(this.contextClassLoader); System.clearProperty("loader.home"); System.clearProperty("loader.path"); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java index 03b1f9d392..034bd49d14 100755 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java @@ -55,7 +55,7 @@ class ExplodedArchiveTests { private ExplodedArchive archive; @BeforeEach - public void setup() throws Exception { + void setup() throws Exception { createArchive(); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java index 69fcb55889..50fc2cdcd0 100755 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java @@ -58,12 +58,12 @@ class JarFileArchiveTests { private String rootJarFileUrl; @BeforeEach - public void setup() throws Exception { + void setup() throws Exception { setup(false); } @AfterEach - public void tearDown() throws Exception { + void tearDown() throws Exception { this.archive.close(); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java index 2e29b7d32b..0e42e0fb12 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java @@ -61,7 +61,7 @@ class RandomAccessDataFileTests { private InputStream inputStream; @BeforeEach - public void setup(@TempDir File tempDir) throws Exception { + void setup(@TempDir File tempDir) throws Exception { this.tempFile = new File(tempDir, "tempFile"); FileOutputStream outputStream = new FileOutputStream(this.tempFile); outputStream.write(BYTES); @@ -71,7 +71,7 @@ class RandomAccessDataFileTests { } @AfterEach - public void cleanup() throws Exception { + void cleanup() throws Exception { this.inputStream.close(); this.file.close(); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/CentralDirectoryParserTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/CentralDirectoryParserTests.java index 6f1856b4d0..5a07238f67 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/CentralDirectoryParserTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/CentralDirectoryParserTests.java @@ -45,14 +45,14 @@ class CentralDirectoryParserTests { private RandomAccessDataFile jarData; @BeforeEach - public void setup(@TempDir File tempDir) throws Exception { + void setup(@TempDir File tempDir) throws Exception { this.jarFile = new File(tempDir, "test.jar"); TestJarCreator.createTestJar(this.jarFile); this.jarData = new RandomAccessDataFile(this.jarFile); } @AfterEach - public void tearDown() throws IOException { + void tearDown() throws IOException { this.jarData.close(); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java index ec9a12943e..2208f94f2e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java @@ -71,7 +71,7 @@ class JarFileTests { private JarFile jarFile; @BeforeEach - public void setup() throws Exception { + void setup() throws Exception { this.rootJarFile = new File(this.tempDir, "root.jar"); TestJarCreator.createTestJar(this.rootJarFile); this.jarFile = new JarFile(this.rootJarFile); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarURLConnectionTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarURLConnectionTests.java index 3b0f777110..e6267ede61 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarURLConnectionTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarURLConnectionTests.java @@ -47,14 +47,14 @@ class JarURLConnectionTests { private JarFile jarFile; @BeforeEach - public void setup(@TempDir File tempDir) throws Exception { + void setup(@TempDir File tempDir) throws Exception { this.rootJarFile = new File(tempDir, "root.jar"); TestJarCreator.createTestJar(this.rootJarFile); this.jarFile = new JarFile(this.rootJarFile); } @AfterEach - public void tearDown() throws Exception { + void tearDown() throws Exception { this.jarFile.close(); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/util/SystemPropertyUtilsTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/util/SystemPropertyUtilsTests.java index dd59cf980a..0697b77b7b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/util/SystemPropertyUtilsTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/util/SystemPropertyUtilsTests.java @@ -30,12 +30,12 @@ import static org.assertj.core.api.Assertions.assertThat; class SystemPropertyUtilsTests { @BeforeEach - public void init() { + void init() { System.setProperty("foo", "bar"); } @AfterEach - public void close() { + void close() { System.clearProperty("foo"); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ArtifactsLibrariesTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ArtifactsLibrariesTests.java index a0fe0e56e0..9243bf26d3 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ArtifactsLibrariesTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ArtifactsLibrariesTests.java @@ -69,7 +69,7 @@ class ArtifactsLibrariesTests { private ArgumentCaptor libraryCaptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.artifacts = Collections.singleton(this.artifact); this.libs = new ArtifactsLibraries(this.artifacts, null, mock(Log.class)); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/BannerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/BannerTests.java index 8a329b8614..c60f5be240 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/BannerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/BannerTests.java @@ -53,7 +53,7 @@ class BannerTests { private ConfigurableApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } @@ -63,7 +63,7 @@ class BannerTests { private ArgumentCaptor> sourceClassCaptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/BeanDefinitionLoaderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/BeanDefinitionLoaderTests.java index 9654c8ec4f..d194df1fbb 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/BeanDefinitionLoaderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/BeanDefinitionLoaderTests.java @@ -37,12 +37,12 @@ class BeanDefinitionLoaderTests { private StaticApplicationContext registry; @BeforeEach - public void setup() { + void setup() { this.registry = new StaticApplicationContext(); } @AfterEach - public void cleanUp() { + void cleanUp() { this.registry.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java index 7537175b79..9206d40c23 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java @@ -49,12 +49,12 @@ class ImageBannerTests { private static final String INVERT_TRUE = "spring.banner.image.invert=true"; @BeforeEach - public void setup() { + void setup() { AnsiOutput.setEnabled(AnsiOutput.Enabled.ALWAYS); } @AfterEach - public void cleanup() { + void cleanup() { AnsiOutput.setEnabled(Enabled.DETECT); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/OverrideSourcesTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/OverrideSourcesTests.java index 0f689a3964..155484c8a4 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/OverrideSourcesTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/OverrideSourcesTests.java @@ -38,7 +38,7 @@ class OverrideSourcesTests { private ConfigurableApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java index be28bfee93..d985635d9b 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java @@ -36,7 +36,7 @@ class ReproTests { private ConfigurableApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ResourceBannerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ResourceBannerTests.java index c0cbd39a88..a3c9bfadb2 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ResourceBannerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ResourceBannerTests.java @@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat; class ResourceBannerTests { @AfterEach - public void reset() { + void reset() { AnsiOutput.setEnabled(Enabled.DETECT); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java index 98b7ed11c6..5b2843962d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java @@ -144,13 +144,13 @@ class SpringApplicationTests { } @BeforeEach - public void storeAndClearHeadlessProperty() { + void storeAndClearHeadlessProperty() { this.headlessProperty = System.getProperty("java.awt.headless"); System.clearProperty("java.awt.headless"); } @AfterEach - public void reinstateHeadlessProperty() { + void reinstateHeadlessProperty() { if (this.headlessProperty == null) { System.clearProperty("java.awt.headless"); } @@ -160,7 +160,7 @@ class SpringApplicationTests { } @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrarTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrarTests.java index 7ed890a241..b86797deef 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrarTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrarTests.java @@ -55,12 +55,12 @@ class SpringApplicationAdminMXBeanRegistrarTests { private ConfigurableApplicationContext context; @BeforeEach - public void setup() { + void setup() { this.mBeanServer = ManagementFactory.getPlatformMBeanServer(); } @AfterEach - public void closeContext() { + void closeContext() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ansi/AnsiPropertySourceTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ansi/AnsiPropertySourceTests.java index af25c3687f..26cb59820e 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ansi/AnsiPropertySourceTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ansi/AnsiPropertySourceTests.java @@ -33,7 +33,7 @@ class AnsiPropertySourceTests { private AnsiPropertySource source = new AnsiPropertySource("ansi", false); @AfterEach - public void reset() { + void reset() { AnsiOutput.setEnabled(Enabled.DETECT); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java index d98e84ed59..523cdf930d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java @@ -52,7 +52,7 @@ class SpringApplicationBuilderTests { private ConfigurableApplicationContext context; @AfterEach - public void close() { + void close() { close(this.context); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/ApplicationPidFileWriterTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/ApplicationPidFileWriterTests.java index 78f6643de5..c4bd0600c2 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/ApplicationPidFileWriterTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/ApplicationPidFileWriterTests.java @@ -60,7 +60,7 @@ class ApplicationPidFileWriterTests { @BeforeEach @AfterEach - public void resetListener() { + void resetListener() { System.clearProperty("PIDFILE"); System.clearProperty("PID_FAIL_ON_WRITE_ERROR"); ApplicationPidFileWriter.reset(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/ContextIdApplicationContextInitializerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/ContextIdApplicationContextInitializerTests.java index d786e07690..8b375a00a7 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/ContextIdApplicationContextInitializerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/ContextIdApplicationContextInitializerTests.java @@ -41,7 +41,7 @@ class ContextIdApplicationContextInitializerTests { private List contexts = new ArrayList<>(); @AfterEach - public void closeContexts() { + void closeContexts() { Collections.reverse(this.contexts); this.contexts.forEach(ConfigurableApplicationContext::close); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/TypeExcludeFilterTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/TypeExcludeFilterTests.java index f8328e1901..a5e0036bbe 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/TypeExcludeFilterTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/TypeExcludeFilterTests.java @@ -42,7 +42,7 @@ class TypeExcludeFilterTests { private AnnotationConfigApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/AnsiOutputApplicationListenerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/AnsiOutputApplicationListenerTests.java index ab72b80516..4976dbfb25 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/AnsiOutputApplicationListenerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/AnsiOutputApplicationListenerTests.java @@ -46,12 +46,12 @@ class AnsiOutputApplicationListenerTests { private ConfigurableApplicationContext context; @BeforeEach - public void resetAnsi() { + void resetAnsi() { AnsiOutput.setEnabled(Enabled.DETECT); } @AfterEach - public void cleanUp() { + void cleanUp() { resetAnsi(); if (this.context != null) { this.context.close(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java index 048d4f573f..7e253e1ffc 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java @@ -86,7 +86,7 @@ class ConfigFileApplicationListenerTests { private ConfigurableApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerYamlProfileNegationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerYamlProfileNegationTests.java index 53c8034a40..b51aba1f2a 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerYamlProfileNegationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerYamlProfileNegationTests.java @@ -37,7 +37,7 @@ class ConfigFileApplicationListenerYamlProfileNegationTests { private ConfigurableApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/DelegatingApplicationListenerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/DelegatingApplicationListenerTests.java index 58cc81bad1..ac953a3a1c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/DelegatingApplicationListenerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/DelegatingApplicationListenerTests.java @@ -43,7 +43,7 @@ class DelegatingApplicationListenerTests { private final StaticApplicationContext context = new StaticApplicationContext(); @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindHandlerAdvisorTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindHandlerAdvisorTests.java index bcdf73475c..8eee5e350f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindHandlerAdvisorTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindHandlerAdvisorTests.java @@ -46,7 +46,7 @@ class ConfigurationPropertiesBindHandlerAdvisorTests { private AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); @AfterEach - public void cleanup() { + void cleanup() { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanRegistrarTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanRegistrarTests.java index dc19f65feb..be4a90aebc 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanRegistrarTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanRegistrarTests.java @@ -45,7 +45,7 @@ class ConfigurationPropertiesScanRegistrarTests { private final DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory(); @BeforeEach - public void setup() { + void setup() { this.registrar.setEnvironment(new MockEnvironment()); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanTests.java index 4870982c8b..6020b26562 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanTests.java @@ -41,12 +41,12 @@ class ConfigurationPropertiesScanTests { private AnnotationConfigApplicationContext context; @BeforeEach - public void setup() { + void setup() { this.context = new AnnotationConfigApplicationContext(); } @AfterEach - public void teardown() { + void teardown() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java index c5f614da29..92a05af1f3 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java @@ -110,7 +110,7 @@ class ConfigurationPropertiesTests { private AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); @AfterEach - public void cleanup() { + void cleanup() { this.context.close(); System.clearProperty("name"); System.clearProperty("nested.name"); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindConverterTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindConverterTests.java index 702a50a0ac..d11434bf64 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindConverterTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindConverterTests.java @@ -54,7 +54,7 @@ class BindConverterTests { private Consumer propertyEditorInitializer; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindResultTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindResultTests.java index b39d596878..fee204df4f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindResultTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindResultTests.java @@ -53,7 +53,7 @@ class BindResultTests { private Supplier supplier; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/handler/IgnoreErrorsBindHandlerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/handler/IgnoreErrorsBindHandlerTests.java index fad5177b65..c9750851e6 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/handler/IgnoreErrorsBindHandlerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/handler/IgnoreErrorsBindHandlerTests.java @@ -44,7 +44,7 @@ class IgnoreErrorsBindHandlerTests { private Binder binder; @BeforeEach - public void setup() { + void setup() { MockConfigurationPropertySource source = new MockConfigurationPropertySource(); source.put("example.foo", "bar"); this.sources.add(source); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/handler/IgnoreTopLevelConverterNotFoundBindHandlerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/handler/IgnoreTopLevelConverterNotFoundBindHandlerTests.java index acc50763b9..09b86723f8 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/handler/IgnoreTopLevelConverterNotFoundBindHandlerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/handler/IgnoreTopLevelConverterNotFoundBindHandlerTests.java @@ -44,7 +44,7 @@ class IgnoreTopLevelConverterNotFoundBindHandlerTests { private Binder binder; @BeforeEach - public void setup() { + void setup() { MockConfigurationPropertySource source = new MockConfigurationPropertySource(); source.put("example", "bar"); this.sources.add(source); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/test/PackagePrivateBeanBindingTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/test/PackagePrivateBeanBindingTests.java index 896c4e81e8..2921fc20b2 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/test/PackagePrivateBeanBindingTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/test/PackagePrivateBeanBindingTests.java @@ -44,7 +44,7 @@ class PackagePrivateBeanBindingTests { private ConfigurationPropertyName name; @BeforeEach - public void setup() { + void setup() { this.binder = new Binder(this.sources); this.name = ConfigurationPropertyName.of("foo"); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/validation/ValidationBindHandlerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/validation/ValidationBindHandlerTests.java index d6e740860f..0b1e8c9020 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/validation/ValidationBindHandlerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/validation/ValidationBindHandlerTests.java @@ -63,7 +63,7 @@ class ValidationBindHandlerTests { private LocalValidatorFactoryBean validator; @BeforeEach - public void setup() { + void setup() { this.binder = new Binder(this.sources); this.validator = new LocalValidatorFactoryBean(); this.validator.afterPropertiesSet(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/UnboundElementsSourceFilterTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/UnboundElementsSourceFilterTests.java index 76c746d115..ce9c23ce69 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/UnboundElementsSourceFilterTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/UnboundElementsSourceFilterTests.java @@ -38,7 +38,7 @@ class UnboundElementsSourceFilterTests { private ConfigurationPropertySource source; @BeforeEach - public void setUp() { + void setUp() { this.filter = new UnboundElementsSourceFilter(); this.source = mock(ConfigurationPropertySource.class); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/FailureAnalyzersTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/FailureAnalyzersTests.java index 42f2983e14..d421d02196 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/FailureAnalyzersTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/FailureAnalyzersTests.java @@ -46,7 +46,7 @@ class FailureAnalyzersTests { private static AwareFailureAnalyzer failureAnalyzer; @BeforeEach - public void configureMock() { + void configureMock() { failureAnalyzer = mock(AwareFailureAnalyzer.class); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BindValidationFailureAnalyzerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BindValidationFailureAnalyzerTests.java index 84ab1b401d..007b94540c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BindValidationFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BindValidationFailureAnalyzerTests.java @@ -52,12 +52,12 @@ import static org.assertj.core.api.Assertions.assertThat; class BindValidationFailureAnalyzerTests { @BeforeEach - public void setup() { + void setup() { LocaleContextHolder.setLocale(Locale.US); } @AfterEach - public void cleanup() { + void cleanup() { LocaleContextHolder.resetLocaleContext(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/UnboundConfigurationPropertyFailureAnalyzerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/UnboundConfigurationPropertyFailureAnalyzerTests.java index 8eb3a2aaf8..52fb7a2eaf 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/UnboundConfigurationPropertyFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/UnboundConfigurationPropertyFailureAnalyzerTests.java @@ -44,12 +44,12 @@ import static org.assertj.core.api.Assertions.assertThat; class UnboundConfigurationPropertyFailureAnalyzerTests { @BeforeEach - public void setup() { + void setup() { LocaleContextHolder.setLocale(Locale.US); } @AfterEach - public void cleanup() { + void cleanup() { LocaleContextHolder.resetLocaleContext(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedPropertiesLoaderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedPropertiesLoaderTests.java index b93966a159..d1ae901483 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedPropertiesLoaderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedPropertiesLoaderTests.java @@ -43,7 +43,7 @@ class OriginTrackedPropertiesLoaderTests { private Map properties; @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { String path = "test-properties.properties"; this.resource = new ClassPathResource(path, getClass()); this.properties = new OriginTrackedPropertiesLoader(this.resource).load(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedYamlLoaderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedYamlLoaderTests.java index f392fcbafa..20f26885d4 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedYamlLoaderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedYamlLoaderTests.java @@ -42,7 +42,7 @@ class OriginTrackedYamlLoaderTests { private List> result; @BeforeEach - public void setUp() { + void setUp() { Resource resource = new ClassPathResource("test-yaml.yml", getClass()); this.loader = new OriginTrackedYamlLoader(resource); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jackson/JsonComponentModuleTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jackson/JsonComponentModuleTests.java index f642856e1d..dcd1cffa1d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jackson/JsonComponentModuleTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jackson/JsonComponentModuleTests.java @@ -44,7 +44,7 @@ class JsonComponentModuleTests { private AnnotationConfigApplicationContext context; @AfterEach - public void closeContext() { + void closeContext() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceBuilderTests.java index b125e70d09..2fe8667868 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceBuilderTests.java @@ -41,7 +41,7 @@ class DataSourceBuilderTests { private DataSource dataSource; @AfterEach - public void shutdownDataSource() throws IOException { + void shutdownDataSource() throws IOException { if (this.dataSource instanceof Closeable) { ((Closeable) this.dataSource).close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/CompositeDataSourcePoolMetadataProviderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/CompositeDataSourcePoolMetadataProviderTests.java index 984ba43e00..c369da0dec 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/CompositeDataSourcePoolMetadataProviderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/metadata/CompositeDataSourcePoolMetadataProviderTests.java @@ -57,7 +57,7 @@ class CompositeDataSourcePoolMetadataProviderTests { private DataSource unknownDataSource; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); given(this.firstProvider.getDataSourcePoolMetadata(this.firstDataSource)).willReturn(this.first); given(this.firstProvider.getDataSourcePoolMetadata(this.secondDataSource)).willReturn(this.second); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/liquibase/LiquibaseServiceLocatorApplicationListenerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/liquibase/LiquibaseServiceLocatorApplicationListenerTests.java index 6f862fa15d..7c43531272 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/liquibase/LiquibaseServiceLocatorApplicationListenerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/liquibase/LiquibaseServiceLocatorApplicationListenerTests.java @@ -48,7 +48,7 @@ class LiquibaseServiceLocatorApplicationListenerTests { private ConfigurableApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/LoggingSystemPropertiesTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/LoggingSystemPropertiesTests.java index f27da5e8d8..0297914bbe 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/LoggingSystemPropertiesTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/LoggingSystemPropertiesTests.java @@ -41,12 +41,12 @@ class LoggingSystemPropertiesTests { private Set systemPropertyNames; @BeforeEach - public void captureSystemPropertyNames() { + void captureSystemPropertyNames() { this.systemPropertyNames = new HashSet<>(System.getProperties().keySet()); } @AfterEach - public void restoreSystemProperties() { + void restoreSystemProperties() { System.getProperties().keySet().retainAll(this.systemPropertyNames); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/LoggingSystemTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/LoggingSystemTests.java index e202dc00af..036c3fc2b2 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/LoggingSystemTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/LoggingSystemTests.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; class LoggingSystemTests { @AfterEach - public void clearSystemProperty() { + void clearSystemProperty() { System.clearProperty(LoggingSystem.SYSTEM_PROPERTY); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringBootJoranConfiguratorTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringBootJoranConfiguratorTests.java index fdae7c55f5..fb7962ea3c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringBootJoranConfiguratorTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringBootJoranConfiguratorTests.java @@ -60,7 +60,7 @@ class SpringBootJoranConfiguratorTests { private CapturedOutput capturedOutput; @BeforeEach - public void setup(CapturedOutput capturedOutput) { + void setup(CapturedOutput capturedOutput) { this.capturedOutput = capturedOutput; this.environment = new MockEnvironment(); this.initializationContext = new LoggingInitializationContext(this.environment); @@ -71,7 +71,7 @@ class SpringBootJoranConfiguratorTests { } @AfterEach - public void reset() { + void reset() { this.context.stop(); new BasicConfigurator().configure((LoggerContext) LoggerFactory.getILoggerFactory()); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringProfileActionTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringProfileActionTests.java index 1702caa48c..3f1b66c83b 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringProfileActionTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringProfileActionTests.java @@ -55,7 +55,7 @@ class SpringProfileActionTests { private final Attributes attributes = mock(Attributes.class); @BeforeEach - public void setUp() { + void setUp() { this.action.setContext(this.context); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/orm/jpa/hibernate/SpringPhysicalNamingStrategyTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/orm/jpa/hibernate/SpringPhysicalNamingStrategyTests.java index e35e7c7613..129b874a3e 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/orm/jpa/hibernate/SpringPhysicalNamingStrategyTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/orm/jpa/hibernate/SpringPhysicalNamingStrategyTests.java @@ -42,7 +42,7 @@ class SpringPhysicalNamingStrategyTests { private MetadataSources metadataSources; @BeforeEach - public void setup() { + void setup() { this.metadataSources = new MetadataSources(createServiceRegistry()); this.metadataSources.addAnnotatedClass(TelephoneNumber.class); this.metadata = this.metadataSources.getMetadataBuilder() diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java index b194364e9a..507ff52bea 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java @@ -64,7 +64,7 @@ class NettyRSocketServerFactoryTests { private static final Duration TIMEOUT = Duration.ofSeconds(3); @AfterEach - public void tearDown() { + void tearDown() { if (this.rSocketServer != null) { try { this.rSocketServer.stop(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderClientHttpRequestFactoryWrapperTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderClientHttpRequestFactoryWrapperTests.java index f136547137..655174240d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderClientHttpRequestFactoryWrapperTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderClientHttpRequestFactoryWrapperTests.java @@ -53,7 +53,7 @@ public class RestTemplateBuilderClientHttpRequestFactoryWrapperTests { private final HttpHeaders headers = new HttpHeaders(); @BeforeEach - public void setUp() throws IOException { + void setUp() throws IOException { this.requestFactory = mock(ClientHttpRequestFactory.class); ClientHttpRequest request = mock(ClientHttpRequest.class); given(this.requestFactory.createRequest(any(), any())).willReturn(request); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderTests.java index 818526780e..03435302fa 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderTests.java @@ -84,7 +84,7 @@ class RestTemplateBuilderTests { private ClientHttpRequestInterceptor interceptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/context/WebServerPortFileWriterTest.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/context/WebServerPortFileWriterTest.java index 727a6660dc..8c34661db5 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/context/WebServerPortFileWriterTest.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/context/WebServerPortFileWriterTest.java @@ -48,7 +48,7 @@ class WebServerPortFileWriterTest { @BeforeEach @AfterEach - public void reset() { + void reset() { System.clearProperty("PORTFILE"); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/CompressionConnectorCustomizerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/CompressionConnectorCustomizerTests.java index 2dc0ba2bd9..cb1c8c7867 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/CompressionConnectorCustomizerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/CompressionConnectorCustomizerTests.java @@ -43,7 +43,7 @@ class CompressionConnectorCustomizerTests { private Compression compression; @BeforeEach - public void setup() { + void setup() { this.compression = new Compression(); this.compression.setEnabled(true); this.compression.setMinResponseSize(DataSize.ofBytes(MIN_SIZE)); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizerTests.java index bfa1f9101a..b47c022298 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizerTests.java @@ -61,7 +61,7 @@ class SslConnectorCustomizerTests { private Connector connector; @BeforeEach - public void setup() { + void setup() { this.tomcat = new Tomcat(); this.connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); this.connector.setPort(0); @@ -69,7 +69,7 @@ class SslConnectorCustomizerTests { } @AfterEach - public void stop() throws Exception { + void stop() throws Exception { System.clearProperty("javax.net.ssl.trustStorePassword"); ReflectionTestUtils.setField(TomcatURLStreamHandlerFactory.class, "instance", null); ReflectionTestUtils.setField(URL.class, "factory", null); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java index 44456c0f14..3e29cd103f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java @@ -105,7 +105,7 @@ class TomcatServletWebServerFactoryTests extends AbstractServletWebServerFactory } @AfterEach - public void restoreTccl() { + void restoreTccl() { ReflectionTestUtils.setField(TomcatURLStreamHandlerFactory.class, "instance", null); ReflectionTestUtils.setField(URL.class, "factory", null); Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/FileSessionPersistenceTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/FileSessionPersistenceTests.java index 6db83a32de..80c554651a 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/FileSessionPersistenceTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/FileSessionPersistenceTests.java @@ -45,7 +45,7 @@ class FileSessionPersistenceTests { private Date expiration = new Date(System.currentTimeMillis() + 10000); @BeforeEach - public void setup(@TempDir File tempDir) throws IOException { + void setup(@TempDir File tempDir) throws IOException { this.dir = tempDir; this.dir.mkdir(); this.persistence = new FileSessionPersistence(this.dir); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/JarResourceManagerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/JarResourceManagerTests.java index ecdae926b6..27052314b0 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/JarResourceManagerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/JarResourceManagerTests.java @@ -40,7 +40,7 @@ class JarResourceManagerTests { private ResourceManager resourceManager; @BeforeEach - public void createJar(@TempDir File tempDir) throws IOException { + void createJar(@TempDir File tempDir) throws IOException { File jar = new File(tempDir, "test.jar"); try (JarOutputStream out = new JarOutputStream(new FileOutputStream(jar))) { out.putNextEntry(new ZipEntry("hello.txt")); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/result/view/MustacheViewResolverTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/result/view/MustacheViewResolverTests.java index 0e310e4dd8..bfecd40007 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/result/view/MustacheViewResolverTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/result/view/MustacheViewResolverTests.java @@ -37,7 +37,7 @@ class MustacheViewResolverTests { private MustacheViewResolver resolver = new MustacheViewResolver(); @BeforeEach - public void init() { + void init() { GenericApplicationContext applicationContext = new GenericApplicationContext(); applicationContext.refresh(); this.resolver.setApplicationContext(applicationContext); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/result/view/MustacheViewTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/result/view/MustacheViewTests.java index 69256c23a9..a43727f5d6 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/result/view/MustacheViewTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/result/view/MustacheViewTests.java @@ -46,7 +46,7 @@ class MustacheViewTests { private MockServerWebExchange exchange; @BeforeEach - public void init() { + void init() { this.context.refresh(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java index a9a739d292..3556f49864 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java @@ -76,7 +76,7 @@ public abstract class AbstractReactiveWebServerFactoryTests { protected WebServer webServer; @AfterEach - public void tearDown() { + void tearDown() { if (this.webServer != null) { try { this.webServer.stop(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessorTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessorTests.java index 043a0f4ffa..aa4e1a972f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessorTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessorTests.java @@ -48,7 +48,7 @@ class WebServerFactoryCustomizerBeanPostProcessorTests { private ListableBeanFactory beanFactory; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.processor.setBeanFactory(this.beanFactory); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBeanTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBeanTests.java index 10d94e5411..af25143ba9 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBeanTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBeanTests.java @@ -55,7 +55,7 @@ abstract class AbstractFilterRegistrationBeanTests { FilterRegistration.Dynamic registration; @BeforeEach - public void setupMocks() { + void setupMocks() { MockitoAnnotations.initMocks(this); given(this.servletContext.addFilter(anyString(), any(Filter.class))).willReturn(this.registration); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/FilterRegistrationIntegrationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/FilterRegistrationIntegrationTests.java index 1e071f6f73..418213ed76 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/FilterRegistrationIntegrationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/FilterRegistrationIntegrationTests.java @@ -39,7 +39,7 @@ class FilterRegistrationIntegrationTests { private AnnotationConfigServletWebServerApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanIntegrationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanIntegrationTests.java index edaf2b9d7f..4421275bb8 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanIntegrationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanIntegrationTests.java @@ -43,7 +43,7 @@ class ServletComponentScanIntegrationTests { private AnnotationConfigServletWebServerApplicationContext context; @AfterEach - public void cleanUp() { + void cleanUp() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrarTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrarTests.java index f601022c8c..a19452c8d2 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrarTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrarTests.java @@ -37,7 +37,7 @@ class ServletComponentScanRegistrarTests { private AnnotationConfigApplicationContext context; @AfterEach - public void after() { + void after() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletListenerRegistrationBeanTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletListenerRegistrationBeanTests.java index d58e67709e..f7c65b1b23 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletListenerRegistrationBeanTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletListenerRegistrationBeanTests.java @@ -45,7 +45,7 @@ class ServletListenerRegistrationBeanTests { private ServletContext servletContext; @BeforeEach - public void setupMocks() { + void setupMocks() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletRegistrationBeanTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletRegistrationBeanTests.java index 8932978d0e..302bd4283c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletRegistrationBeanTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletRegistrationBeanTests.java @@ -61,7 +61,7 @@ class ServletRegistrationBeanTests { private FilterRegistration.Dynamic filterRegistration; @BeforeEach - public void setupMocks() { + void setupMocks() { MockitoAnnotations.initMocks(this); given(this.servletContext.addServlet(anyString(), any(Servlet.class))).willReturn(this.registration); given(this.servletContext.addFilter(anyString(), any(Filter.class))).willReturn(this.filterRegistration); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContextTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContextTests.java index 8cfe59d740..fad5b0477d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContextTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContextTests.java @@ -51,7 +51,7 @@ class AnnotationConfigServletWebServerApplicationContextTests { private AnnotationConfigServletWebServerApplicationContext context; @AfterEach - public void close() { + void close() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContextTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContextTests.java index 413fee8dda..7707b8ed39 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContextTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContextTests.java @@ -95,13 +95,13 @@ class ServletWebServerApplicationContextTests { private ArgumentCaptor filterCaptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.context = new ServletWebServerApplicationContext(); } @AfterEach - public void cleanup() { + void cleanup() { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerMvcIntegrationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerMvcIntegrationTests.java index 4a1111ae8b..81374f313d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerMvcIntegrationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerMvcIntegrationTests.java @@ -58,7 +58,7 @@ class ServletWebServerMvcIntegrationTests { private AnnotationConfigServletWebServerApplicationContext context; @AfterEach - public void closeContext() { + void closeContext() { try { this.context.close(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java index 1cbb13ce32..736295226c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java @@ -147,7 +147,7 @@ public abstract class AbstractServletWebServerFactoryTests { private final HttpClientContext httpClientContext = HttpClientContext.create(); @AfterEach - public void tearDown() { + void tearDown() { if (this.webServer != null) { try { this.webServer.stop(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterIntegrationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterIntegrationTests.java index c420d57824..db4febcbcf 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterIntegrationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterIntegrationTests.java @@ -76,7 +76,7 @@ class ErrorPageFilterIntegrationTests { private AnnotationConfigServletWebServerApplicationContext context; @AfterEach - public void init() { + void init() { this.controller.reset(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/SpringBootServletInitializerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/SpringBootServletInitializerTests.java index 4b58900b4e..a8a6a1238e 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/SpringBootServletInitializerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/SpringBootServletInitializerTests.java @@ -61,7 +61,7 @@ class SpringBootServletInitializerTests { private SpringApplication application; @AfterEach - public void verifyLoggingOutput(CapturedOutput capturedOutput) { + void verifyLoggingOutput(CapturedOutput capturedOutput) { assertThat(capturedOutput).doesNotContain(StandardServletEnvironment.class.getSimpleName()); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/MustacheViewResolverTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/MustacheViewResolverTests.java index af316e5f30..4208c16380 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/MustacheViewResolverTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/MustacheViewResolverTests.java @@ -38,7 +38,7 @@ class MustacheViewResolverTests { private MustacheViewResolver resolver = new MustacheViewResolver(); @BeforeEach - public void init() { + void init() { GenericApplicationContext applicationContext = new GenericApplicationContext(); applicationContext.refresh(); this.resolver.setApplicationContext(applicationContext); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/MustacheViewTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/MustacheViewTests.java index c6daddaa74..3190d11423 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/MustacheViewTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/MustacheViewTests.java @@ -47,7 +47,7 @@ class MustacheViewTests { private AnnotationConfigServletWebApplicationContext context = new AnnotationConfigServletWebApplicationContext(); @BeforeEach - public void init() { + void init() { this.context.refresh(); MockServletContext servletContext = new MockServletContext(); this.context.setServletContext(servletContext); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilderTests.java index 8731433759..3182ccf688 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilderTests.java @@ -67,7 +67,7 @@ class WebServiceTemplateBuilderTests { private ClientInterceptor interceptor; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); } diff --git a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/CorsSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/CorsSampleActuatorApplicationTests.java index 032b82fdde..741e33a1f6 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/CorsSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/CorsSampleActuatorApplicationTests.java @@ -50,7 +50,7 @@ class CorsSampleActuatorApplicationTests { private ApplicationContext applicationContext; @BeforeEach - public void setUp() { + void setUp() { RestTemplateBuilder builder = new RestTemplateBuilder(); LocalHostUriTemplateHandler handler = new LocalHostUriTemplateHandler(this.applicationContext.getEnvironment(), "http"); diff --git a/spring-boot-samples/spring-boot-sample-aop/src/test/java/sample/aop/SampleAopApplicationTests.java b/spring-boot-samples/spring-boot-sample-aop/src/test/java/sample/aop/SampleAopApplicationTests.java index 6c8685b927..17a96ef670 100644 --- a/spring-boot-samples/spring-boot-sample-aop/src/test/java/sample/aop/SampleAopApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-aop/src/test/java/sample/aop/SampleAopApplicationTests.java @@ -38,12 +38,12 @@ class SampleAopApplicationTests { private String profiles; @BeforeEach - public void init() { + void init() { this.profiles = System.getProperty("spring.profiles.active"); } @AfterEach - public void after() { + void after() { if (this.profiles != null) { System.setProperty("spring.profiles.active", this.profiles); } diff --git a/spring-boot-samples/spring-boot-sample-data-jdbc/src/test/java/sample/data/jdbc/SampleDataJdbcApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-jdbc/src/test/java/sample/data/jdbc/SampleDataJdbcApplicationTests.java index 143ca0c06e..76e2a104d9 100644 --- a/spring-boot-samples/spring-boot-sample-data-jdbc/src/test/java/sample/data/jdbc/SampleDataJdbcApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-jdbc/src/test/java/sample/data/jdbc/SampleDataJdbcApplicationTests.java @@ -44,7 +44,7 @@ class SampleDataJdbcApplicationTests { private MockMvc mvc; @BeforeEach - public void setUp() { + void setUp() { this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build(); } diff --git a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java index 819870b254..0a22960a50 100644 --- a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java @@ -53,7 +53,7 @@ class SampleDataJpaApplicationTests { private MockMvc mvc; @BeforeEach - public void setUp() { + void setUp() { this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build(); } diff --git a/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/SampleDataRestApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/SampleDataRestApplicationTests.java index eddb8643ad..5723473ab0 100644 --- a/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/SampleDataRestApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/SampleDataRestApplicationTests.java @@ -49,7 +49,7 @@ class SampleDataRestApplicationTests { private MockMvc mvc; @BeforeEach - public void setUp() { + void setUp() { this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build(); } diff --git a/spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java b/spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java index db318ca9fe..44a0c363da 100644 --- a/spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java @@ -52,7 +52,7 @@ class SampleIntegrationApplicationTests { private ConfigurableApplicationContext context; @AfterEach - public void stop() { + void stop() { if (this.context != null) { this.context.close(); } diff --git a/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/SampleJpaApplicationTests.java b/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/SampleJpaApplicationTests.java index 75ee122cf2..585b615a79 100644 --- a/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/SampleJpaApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/SampleJpaApplicationTests.java @@ -46,7 +46,7 @@ class SampleJpaApplicationTests { private MockMvc mvc; @BeforeEach - public void setUp() { + void setUp() { this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build(); } diff --git a/spring-boot-samples/spring-boot-sample-profile/src/test/java/sample/profile/SampleProfileApplicationTests.java b/spring-boot-samples/spring-boot-sample-profile/src/test/java/sample/profile/SampleProfileApplicationTests.java index d841e3ab8f..aafb89bff6 100644 --- a/spring-boot-samples/spring-boot-sample-profile/src/test/java/sample/profile/SampleProfileApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-profile/src/test/java/sample/profile/SampleProfileApplicationTests.java @@ -32,12 +32,12 @@ class SampleProfileApplicationTests { private String profiles; @BeforeEach - public void before() { + void before() { this.profiles = System.getProperty("spring.profiles.active"); } @AfterEach - public void after() { + void after() { if (this.profiles != null) { System.setProperty("spring.profiles.active", this.profiles); } diff --git a/spring-boot-samples/spring-boot-sample-property-validation/src/test/java/sample/propertyvalidation/SamplePropertyValidationApplicationTests.java b/spring-boot-samples/spring-boot-sample-property-validation/src/test/java/sample/propertyvalidation/SamplePropertyValidationApplicationTests.java index abe3ab92a0..400f655e2c 100644 --- a/spring-boot-samples/spring-boot-sample-property-validation/src/test/java/sample/propertyvalidation/SamplePropertyValidationApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-property-validation/src/test/java/sample/propertyvalidation/SamplePropertyValidationApplicationTests.java @@ -38,7 +38,7 @@ class SamplePropertyValidationApplicationTests { private final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); @AfterEach - public void closeContext() { + void closeContext() { this.context.close(); } diff --git a/spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java b/spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java index d59edacfbf..cb1c2ec378 100644 --- a/spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java @@ -45,12 +45,12 @@ class SampleSecureApplicationTests { private Authentication authentication; @BeforeEach - public void init() { + void init() { this.authentication = new UsernamePasswordAuthenticationToken("user", "password"); } @AfterEach - public void close() { + void close() { SecurityContextHolder.clearContext(); } diff --git a/spring-boot-samples/spring-boot-sample-simple/src/test/java/sample/simple/SampleSimpleApplicationTests.java b/spring-boot-samples/spring-boot-sample-simple/src/test/java/sample/simple/SampleSimpleApplicationTests.java index 3e75ca8887..411b12f326 100644 --- a/spring-boot-samples/spring-boot-sample-simple/src/test/java/sample/simple/SampleSimpleApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-simple/src/test/java/sample/simple/SampleSimpleApplicationTests.java @@ -38,12 +38,12 @@ class SampleSimpleApplicationTests { private String profiles; @BeforeEach - public void init() { + void init() { this.profiles = System.getProperty("spring.profiles.active"); } @AfterEach - public void after() { + void after() { if (this.profiles != null) { System.setProperty("spring.profiles.active", this.profiles); } diff --git a/spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/SampleTestApplicationWebIntegrationTests.java b/spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/SampleTestApplicationWebIntegrationTests.java index fa6b25272e..bd60574170 100644 --- a/spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/SampleTestApplicationWebIntegrationTests.java +++ b/spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/SampleTestApplicationWebIntegrationTests.java @@ -49,7 +49,7 @@ class SampleTestApplicationWebIntegrationTests { private VehicleDetailsService vehicleDetailsService; @BeforeEach - public void setup() { + void setup() { given(this.vehicleDetailsService.getVehicleDetails(VIN)).willReturn(new VehicleDetails("Honda", "Civic")); } diff --git a/spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/web/UserVehicleServiceTests.java b/spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/web/UserVehicleServiceTests.java index f709d1ee3e..a847b33812 100644 --- a/spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/web/UserVehicleServiceTests.java +++ b/spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/web/UserVehicleServiceTests.java @@ -50,7 +50,7 @@ class UserVehicleServiceTests { private UserVehicleService service; @BeforeEach - public void setup() { + void setup() { MockitoAnnotations.initMocks(this); this.service = new UserVehicleService(this.userRepository, this.vehicleDetailsService); } diff --git a/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/MessageControllerWebTests.java b/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/MessageControllerWebTests.java index c7c201ce81..e8c5a7be82 100755 --- a/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/MessageControllerWebTests.java +++ b/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/MessageControllerWebTests.java @@ -51,7 +51,7 @@ class MessageControllerWebTests { private MockMvc mockMvc; @BeforeEach - public void setup() { + void setup() { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); } diff --git a/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/MessageControllerWebTests.java b/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/MessageControllerWebTests.java index 106ec67113..66b02253a6 100644 --- a/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/MessageControllerWebTests.java +++ b/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/MessageControllerWebTests.java @@ -51,7 +51,7 @@ class MessageControllerWebTests { private MockMvc mockMvc; @BeforeEach - public void setup() { + void setup() { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); } diff --git a/spring-boot-samples/spring-boot-sample-webservices/src/test/java/sample/webservices/SampleWsApplicationTests.java b/spring-boot-samples/spring-boot-sample-webservices/src/test/java/sample/webservices/SampleWsApplicationTests.java index 616382b8f6..02a18aa6ab 100644 --- a/spring-boot-samples/spring-boot-sample-webservices/src/test/java/sample/webservices/SampleWsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-webservices/src/test/java/sample/webservices/SampleWsApplicationTests.java @@ -44,7 +44,7 @@ class SampleWsApplicationTests { private int serverPort; @BeforeEach - public void setUp() { + void setUp() { this.webServiceTemplate.setDefaultUri("http://localhost:" + this.serverPort + "/services/"); } diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java index 936c3722dd..bf7d50b98b 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java @@ -68,7 +68,7 @@ public class DevToolsIntegrationTests { } @AfterEach - public void stopApplication() throws InterruptedException { + void stopApplication() throws InterruptedException { this.launchedApplication.stop(); } diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsWithLazyInitializationIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsWithLazyInitializationIntegrationTests.java index f1529710a1..576e3da3d3 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsWithLazyInitializationIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsWithLazyInitializationIntegrationTests.java @@ -69,7 +69,7 @@ public class DevToolsWithLazyInitializationIntegrationTests { } @AfterEach - public void stopApplication() throws InterruptedException { + void stopApplication() throws InterruptedException { this.launchedApplication.stop(); }