From 8a425dedfd19b87df1e92c34e8576467895cc0c6 Mon Sep 17 00:00:00 2001 From: izeye Date: Wed, 18 Aug 2021 00:52:34 +0900 Subject: [PATCH] Polish access modifiers for test classes See gh-27736 --- .../boot/build/artifactory/ArtifactoryRepositoryTests.java | 2 +- .../boot/build/bom/BomPluginIntegrationTests.java | 4 ++-- .../bomr/version/ArtifactVersionDependencyVersionTests.java | 2 +- .../bomr/version/CalendarVersionDependencyVersionTests.java | 2 +- .../boot/build/bom/bomr/version/DependencyVersionTests.java | 2 +- .../version/NumericQualifierDependencyVersionTests.java | 2 +- .../bomr/version/ReleaseTrainDependencyVersionTests.java | 2 +- .../build/log4j2/ReproduciblePluginsDatActionTests.java | 2 +- .../boot/build/mavenplugin/PluginXmlParserTests.java | 2 +- .../OptionalDependenciesPluginIntegrationTests.java | 6 +++--- .../web/servlet/DefaultWebMvcTagsProviderTests.java | 2 +- .../boot/actuate/metrics/http/OutcomeTests.java | 2 +- .../reactive/server/DefaultWebFluxTagsProviderTests.java | 2 +- .../boot/autoconfigure/AutoConfigurationPackagesTests.java | 2 +- .../context/LifecycleAutoConfigurationTests.java | 2 +- ...tiveElasticsearchRepositoriesAutoConfigurationTests.java | 2 +- ...activeElasticsearchRestClientAutoConfigurationTests.java | 2 +- .../Neo4jReactiveRepositoriesAutoConfigurationTests.java | 2 +- .../Neo4jRepositoriesAutoConfigurationIntegrationTests.java | 2 +- .../freemarker/FreeMarkerAutoConfigurationTests.java | 2 +- .../autoconfigure/packagestest/two/SecondConfiguration.java | 3 +-- ...otTestWithActiveProfilesAndEnvironmentPropertyTests.java | 2 +- ...WithActiveProfilesAndSystemEnvironmentPropertyTests.java | 2 +- ...entContextCustomizerWithoutSupportedHttpClientTests.java | 2 +- ...ientContextCustomizerWithoutWebfluxIntegrationTests.java | 2 +- .../boot/buildpack/platform/build/BuildRequestTests.java | 2 +- .../docker/configuration/DockerConfigurationTests.java | 2 +- .../bundling/BootBuildImageRegistryIntegrationTests.java | 2 +- .../boot/gradle/tasks/bundling/DockerSpecTests.java | 2 +- .../boot/maven/BuildInfoIntegrationTests.java | 2 +- .../boot/maven/EclipseM2eIntegrationTests.java | 2 +- .../boot/maven/CustomLayersProviderTests.java | 2 +- .../java/org/springframework/boot/maven/DockerTests.java | 2 +- .../context/config/ConfigTreeConfigDataLoaderTests.java | 2 +- .../context/config/ConfigTreeConfigDataResourceTests.java | 2 +- .../boot/context/config/StandardConfigDataLoaderTests.java | 2 +- .../config/StandardConfigDataLocationResolverTests.java | 2 +- .../context/config/StandardConfigDataResourceTests.java | 2 +- .../bind/BoundPropertiesTrackingBindHandlerTests.java | 2 +- ...estTemplateBuilderClientHttpRequestInitializerTests.java | 2 +- .../boot/web/context/WebServerApplicationContextTests.java | 2 +- .../smoketest/rsocket/SampleRSocketApplicationTests.java | 2 +- 42 files changed, 45 insertions(+), 46 deletions(-) diff --git a/buildSrc/src/test/java/org/springframework/boot/build/artifactory/ArtifactoryRepositoryTests.java b/buildSrc/src/test/java/org/springframework/boot/build/artifactory/ArtifactoryRepositoryTests.java index 050dcdd349..001e523fdb 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/artifactory/ArtifactoryRepositoryTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/artifactory/ArtifactoryRepositoryTests.java @@ -27,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class ArtifactoryRepositoryTests { +class ArtifactoryRepositoryTests { @Test void whenProjectVersionIsMilestoneThenRepositoryIsMilestone() { diff --git a/buildSrc/src/test/java/org/springframework/boot/build/bom/BomPluginIntegrationTests.java b/buildSrc/src/test/java/org/springframework/boot/build/bom/BomPluginIntegrationTests.java index 268744ee5e..0a93828427 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/bom/BomPluginIntegrationTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/bom/BomPluginIntegrationTests.java @@ -38,14 +38,14 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class BomPluginIntegrationTests { +class BomPluginIntegrationTests { private File projectDir; private File buildFile; @BeforeEach - public void setup(@TempDir File projectDir) throws IOException { + void setup(@TempDir File projectDir) throws IOException { this.projectDir = projectDir; this.buildFile = new File(this.projectDir, "build.gradle"); } diff --git a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/ArtifactVersionDependencyVersionTests.java b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/ArtifactVersionDependencyVersionTests.java index 643baa2219..9e5dda0ec2 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/ArtifactVersionDependencyVersionTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/ArtifactVersionDependencyVersionTests.java @@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class ArtifactVersionDependencyVersionTests { +class ArtifactVersionDependencyVersionTests { @Test void parseWhenVersionIsNotAMavenVersionShouldReturnNull() { diff --git a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/CalendarVersionDependencyVersionTests.java b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/CalendarVersionDependencyVersionTests.java index ad675e3922..2fcf36b10b 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/CalendarVersionDependencyVersionTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/CalendarVersionDependencyVersionTests.java @@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class CalendarVersionDependencyVersionTests { +class CalendarVersionDependencyVersionTests { @Test void parseWhenVersionIsNotACalendarVersionShouldReturnNull() { diff --git a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/DependencyVersionTests.java b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/DependencyVersionTests.java index 12fc79a866..414e69a931 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/DependencyVersionTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/DependencyVersionTests.java @@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class DependencyVersionTests { +class DependencyVersionTests { @Test void parseWhenValidMavenVersionShouldReturnArtifactVersionDependencyVersion() { diff --git a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/NumericQualifierDependencyVersionTests.java b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/NumericQualifierDependencyVersionTests.java index 5e58d3a99c..3a7cdac099 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/NumericQualifierDependencyVersionTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/NumericQualifierDependencyVersionTests.java @@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class NumericQualifierDependencyVersionTests { +class NumericQualifierDependencyVersionTests { @Test void isNewerThanOnVersionWithNumericQualifierWhenInputHasNoQualifierShouldReturnTrue() { diff --git a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/ReleaseTrainDependencyVersionTests.java b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/ReleaseTrainDependencyVersionTests.java index a541a4e856..74556b01fe 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/ReleaseTrainDependencyVersionTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/version/ReleaseTrainDependencyVersionTests.java @@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class ReleaseTrainDependencyVersionTests { +class ReleaseTrainDependencyVersionTests { @Test void parsingOfANonReleaseTrainVersionReturnsNull() { diff --git a/buildSrc/src/test/java/org/springframework/boot/build/log4j2/ReproduciblePluginsDatActionTests.java b/buildSrc/src/test/java/org/springframework/boot/build/log4j2/ReproduciblePluginsDatActionTests.java index 0d74d79a51..1899dd7ab3 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/log4j2/ReproduciblePluginsDatActionTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/log4j2/ReproduciblePluginsDatActionTests.java @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class ReproduciblePluginsDatActionTests { +class ReproduciblePluginsDatActionTests { @Test void postProcessingOrdersCategoriesAndPlugins() throws IOException { diff --git a/buildSrc/src/test/java/org/springframework/boot/build/mavenplugin/PluginXmlParserTests.java b/buildSrc/src/test/java/org/springframework/boot/build/mavenplugin/PluginXmlParserTests.java index fa0ea8d433..ece8bbcdce 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/mavenplugin/PluginXmlParserTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/mavenplugin/PluginXmlParserTests.java @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; * @author Andy Wilkinson * @author Mike Smithson */ -public class PluginXmlParserTests { +class PluginXmlParserTests { private final PluginXmlParser parser = new PluginXmlParser(); diff --git a/buildSrc/src/test/java/org/springframework/boot/build/optional/OptionalDependenciesPluginIntegrationTests.java b/buildSrc/src/test/java/org/springframework/boot/build/optional/OptionalDependenciesPluginIntegrationTests.java index c6bb5f64c3..22e74a4069 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/optional/OptionalDependenciesPluginIntegrationTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/optional/OptionalDependenciesPluginIntegrationTests.java @@ -34,14 +34,14 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class OptionalDependenciesPluginIntegrationTests { +class OptionalDependenciesPluginIntegrationTests { private File projectDir; private File buildFile; @BeforeEach - public void setup(@TempDir File projectDir) throws IOException { + void setup(@TempDir File projectDir) throws IOException { this.projectDir = projectDir; this.buildFile = new File(this.projectDir, "build.gradle"); } @@ -80,7 +80,7 @@ public class OptionalDependenciesPluginIntegrationTests { optionalDependenciesAreAddedToSourceSetClasspath("test", "runtimeClasspath"); } - public void optionalDependenciesAreAddedToSourceSetClasspath(String sourceSet, String classpath) + private void optionalDependenciesAreAddedToSourceSetClasspath(String sourceSet, String classpath) throws IOException { try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) { out.println("plugins {"); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/DefaultWebMvcTagsProviderTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/DefaultWebMvcTagsProviderTests.java index ca85f4aaec..ad3a7a05c6 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/DefaultWebMvcTagsProviderTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/DefaultWebMvcTagsProviderTests.java @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class DefaultWebMvcTagsProviderTests { +class DefaultWebMvcTagsProviderTests { @Test void whenTagsAreProvidedThenDefaultTagsArePresent() { diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/http/OutcomeTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/http/OutcomeTests.java index a07d325073..96e3d7ccab 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/http/OutcomeTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/http/OutcomeTests.java @@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class OutcomeTests { +class OutcomeTests { @Test void outcomeForInformationalStatusIsInformational() { diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/DefaultWebFluxTagsProviderTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/DefaultWebFluxTagsProviderTests.java index ffae9e16cb..dfbe29492d 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/DefaultWebFluxTagsProviderTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/DefaultWebFluxTagsProviderTests.java @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class DefaultWebFluxTagsProviderTests { +class DefaultWebFluxTagsProviderTests { @Test void whenTagsAreProvidedThenDefaultTagsArePresent() { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationPackagesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationPackagesTests.java index d48346fd5d..966a571d57 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationPackagesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationPackagesTests.java @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; * @author Oliver Gierke */ @SuppressWarnings("resource") -public class AutoConfigurationPackagesTests { +class AutoConfigurationPackagesTests { @Test void setAndGet() { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/LifecycleAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/LifecycleAutoConfigurationTests.java index 818b7b0224..c252a31fdd 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/LifecycleAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/LifecycleAutoConfigurationTests.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -public class LifecycleAutoConfigurationTests { +class LifecycleAutoConfigurationTests { private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(LifecycleAutoConfiguration.class)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java index 41a561b2d6..deba103dd5 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Brian Clozel */ @Testcontainers(disabledWithoutDocker = true) -public class ReactiveElasticsearchRepositoriesAutoConfigurationTests { +class ReactiveElasticsearchRepositoriesAutoConfigurationTests { @Container static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationTests.java index 52e4135409..fc9cd9be71 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationTests.java @@ -45,7 +45,7 @@ import static org.mockito.Mockito.mock; * @author Brian Clozel */ @Testcontainers(disabledWithoutDocker = true) -public class ReactiveElasticsearchRestClientAutoConfigurationTests { +class ReactiveElasticsearchRestClientAutoConfigurationTests { @Container static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfigurationTests.java index 66afb613f5..b209d8198b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfigurationTests.java @@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Stephane Nicoll * @author Michael J. Simons */ -public class Neo4jReactiveRepositoriesAutoConfigurationTests { +class Neo4jReactiveRepositoriesAutoConfigurationTests { private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withUserConfiguration(MockedDriverConfiguration.class) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationIntegrationTests.java index bd33edf9a2..41b4c72487 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationIntegrationTests.java @@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ @SpringBootTest @Testcontainers(disabledWithoutDocker = true) -public class Neo4jRepositoriesAutoConfigurationIntegrationTests { +class Neo4jRepositoriesAutoConfigurationIntegrationTests { @Container private static final Neo4jContainer neo4jServer = new Neo4jContainer<>(DockerImageNames.neo4j()) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java index 27fa3f18cb..abb801b7a1 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Kazuki Shimizu */ @ExtendWith(OutputCaptureExtension.class) -public class FreeMarkerAutoConfigurationTests { +class FreeMarkerAutoConfigurationTests { private final BuildOutput buildOutput = new BuildOutput(getClass()); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/packagestest/two/SecondConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/packagestest/two/SecondConfiguration.java index c8c5af4bb9..9f2c3a1d7f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/packagestest/two/SecondConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/packagestest/two/SecondConfiguration.java @@ -17,11 +17,10 @@ package org.springframework.boot.autoconfigure.packagestest.two; import org.springframework.boot.autoconfigure.AutoConfigurationPackage; -import org.springframework.boot.autoconfigure.AutoConfigurationPackagesTests; import org.springframework.context.annotation.Configuration; /** - * Sample configuration used in {@link AutoConfigurationPackagesTests}. + * Sample configuration used in {@code AutoConfigurationPackagesTests}. * * @author Oliver Gierke */ diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests.java index 6d069ef796..a36698a9f3 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests.java @@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; @SpringBootTest @ActiveProfiles({ "test1", "test2" }) @ContextConfiguration(loader = SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests.Loader.class) -public class SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests { +class SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests { @Autowired private Environment environment; diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests.java index c5817e72b2..0fc3b3387a 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests.java @@ -44,7 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat; @SpringBootTest @ActiveProfiles({ "test1", "test2" }) @ContextConfiguration(loader = SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests.Loader.class) -public class SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests { +class SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests { @Autowired private Environment environment; diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/reactive/server/WebTestClientContextCustomizerWithoutSupportedHttpClientTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/reactive/server/WebTestClientContextCustomizerWithoutSupportedHttpClientTests.java index 2a83f992ce..4ce3b2dd7e 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/reactive/server/WebTestClientContextCustomizerWithoutSupportedHttpClientTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/reactive/server/WebTestClientContextCustomizerWithoutSupportedHttpClientTests.java @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Andy Wilkinson */ @ClassPathExclusions({ "reactor-netty*.jar", "jetty-client*.jar" }) -public class WebTestClientContextCustomizerWithoutSupportedHttpClientTests { +class WebTestClientContextCustomizerWithoutSupportedHttpClientTests { @Test void createContextCustomizerWhenNoSupportedHttpClientIsAvailableShouldReturnNull() { diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/reactive/server/WebTestClientContextCustomizerWithoutWebfluxIntegrationTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/reactive/server/WebTestClientContextCustomizerWithoutWebfluxIntegrationTests.java index a94aabf798..38f515feea 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/reactive/server/WebTestClientContextCustomizerWithoutWebfluxIntegrationTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/reactive/server/WebTestClientContextCustomizerWithoutWebfluxIntegrationTests.java @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Stephane Nicoll */ @ClassPathExclusions("spring-webflux*.jar") -public class WebTestClientContextCustomizerWithoutWebfluxIntegrationTests { +class WebTestClientContextCustomizerWithoutWebfluxIntegrationTests { @Test void customizerIsNotCreatedWithoutWebClient() { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuildRequestTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuildRequestTests.java index e78ff3145e..d8f8a2b9b8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuildRequestTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuildRequestTests.java @@ -44,7 +44,7 @@ import static org.assertj.core.api.Assertions.entry; * @author Phillip Webb * @author Scott Frederick */ -public class BuildRequestTests { +class BuildRequestTests { @TempDir File tempDir; diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerConfigurationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerConfigurationTests.java index fcb734df23..eb8585a1b3 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerConfigurationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerConfigurationTests.java @@ -26,7 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Wei Jiang * @author Scott Frederick */ -public class DockerConfigurationTests { +class DockerConfigurationTests { @Test void createDockerConfigurationWithDefaults() { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImageRegistryIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImageRegistryIntegrationTests.java index de7531dcec..240221f89b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImageRegistryIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImageRegistryIntegrationTests.java @@ -49,7 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat; @GradleCompatibility @Testcontainers(disabledWithoutDocker = true) @Disabled("Disabled until differences between running locally and in CI can be diagnosed") -public class BootBuildImageRegistryIntegrationTests { +class BootBuildImageRegistryIntegrationTests { @Container static final RegistryContainer registry = new RegistryContainer().withStartupAttempts(5) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/DockerSpecTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/DockerSpecTests.java index b305b23b33..8d44f185db 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/DockerSpecTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/DockerSpecTests.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; * @author Wei Jiang * @author Scott Frederick */ -public class DockerSpecTests { +class DockerSpecTests { @Test void asDockerConfigurationWithDefaults() { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/BuildInfoIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/BuildInfoIntegrationTests.java index b2d6bf15e8..1192e54d22 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/BuildInfoIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/BuildInfoIntegrationTests.java @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Andy Wilkinson */ @ExtendWith(MavenBuildExtension.class) -public class BuildInfoIntegrationTests { +class BuildInfoIntegrationTests { @TestTemplate void buildInfoPropertiesAreGenerated(MavenBuild mavenBuild) { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/EclipseM2eIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/EclipseM2eIntegrationTests.java index ba056a5c63..6672c557e6 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/EclipseM2eIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/EclipseM2eIntegrationTests.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -public class EclipseM2eIntegrationTests { +class EclipseM2eIntegrationTests { @Test // gh-21992 void pluginPomIncludesOptionalShadeDependency() throws Exception { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/CustomLayersProviderTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/CustomLayersProviderTests.java index f67f3b7d10..9844922b5c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/CustomLayersProviderTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/CustomLayersProviderTests.java @@ -40,7 +40,7 @@ import static org.mockito.Mockito.mock; * @author Madhura Bhave * @author Scott Frederick */ -public class CustomLayersProviderTests { +class CustomLayersProviderTests { private CustomLayersProvider customLayersProvider; diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DockerTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DockerTests.java index a4421af41b..c3a68a3d80 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DockerTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DockerTests.java @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException * @author Wei Jiang * @author Scott Frederick */ -public class DockerTests { +class DockerTests { @Test void asDockerConfigurationWithDefaults() { diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigTreeConfigDataLoaderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigTreeConfigDataLoaderTests.java index e473917bba..2948c6996d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigTreeConfigDataLoaderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigTreeConfigDataLoaderTests.java @@ -37,7 +37,7 @@ import static org.mockito.Mockito.mock; * @author Madhura Bhave * @author Phillip Webb */ -public class ConfigTreeConfigDataLoaderTests { +class ConfigTreeConfigDataLoaderTests { private ConfigTreeConfigDataLoader loader = new ConfigTreeConfigDataLoader(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigTreeConfigDataResourceTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigTreeConfigDataResourceTests.java index 4bc1cb4a7c..fe9cc984fe 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigTreeConfigDataResourceTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigTreeConfigDataResourceTests.java @@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException * @author Madhura Bhave * @author Phillip Webb */ -public class ConfigTreeConfigDataResourceTests { +class ConfigTreeConfigDataResourceTests { @Test void constructorWhenPathStringIsNullThrowsException() { diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataLoaderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataLoaderTests.java index e4f38fbb24..be06aab292 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataLoaderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataLoaderTests.java @@ -34,7 +34,7 @@ import static org.mockito.Mockito.mock; * @author Madhura Bhave * @author Phillip Webb */ -public class StandardConfigDataLoaderTests { +class StandardConfigDataLoaderTests { private StandardConfigDataLoader loader = new StandardConfigDataLoader(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataLocationResolverTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataLocationResolverTests.java index cfca9fbe0e..98bc74bd28 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataLocationResolverTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataLocationResolverTests.java @@ -44,7 +44,7 @@ import static org.mockito.Mockito.mock; * @author Madhura Bhave * @author Phillip Webb */ -public class StandardConfigDataLocationResolverTests { +class StandardConfigDataLocationResolverTests { private StandardConfigDataLocationResolver resolver; diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataResourceTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataResourceTests.java index 9266af6e06..9acb3fa433 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataResourceTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/StandardConfigDataResourceTests.java @@ -31,7 +31,7 @@ import static org.mockito.Mockito.mock; * @author Madhura Bhave * @author Phillip Webb */ -public class StandardConfigDataResourceTests { +class StandardConfigDataResourceTests { StandardConfigDataReference reference = mock(StandardConfigDataReference.class); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BoundPropertiesTrackingBindHandlerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BoundPropertiesTrackingBindHandlerTests.java index a90c29e895..b63fae7d84 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BoundPropertiesTrackingBindHandlerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BoundPropertiesTrackingBindHandlerTests.java @@ -41,7 +41,7 @@ import static org.mockito.Mockito.verify; * @author Madhura Bhave */ @ExtendWith(MockitoExtension.class) -public class BoundPropertiesTrackingBindHandlerTests { +class BoundPropertiesTrackingBindHandlerTests { private List sources = new ArrayList<>(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderClientHttpRequestInitializerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderClientHttpRequestInitializerTests.java index 520579d46e..41cf6811f8 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderClientHttpRequestInitializerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderClientHttpRequestInitializerTests.java @@ -43,7 +43,7 @@ import static org.mockito.Mockito.mock; * @author Ilya Lukyanovich * @author Phillip Webb */ -public class RestTemplateBuilderClientHttpRequestInitializerTests { +class RestTemplateBuilderClientHttpRequestInitializerTests { private final MockClientHttpRequest request = new MockClientHttpRequest(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/context/WebServerApplicationContextTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/context/WebServerApplicationContextTests.java index d7e13d9cb6..dd196e5227 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/context/WebServerApplicationContextTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/context/WebServerApplicationContextTests.java @@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock; * * @author Phillip Webb */ -public class WebServerApplicationContextTests { +class WebServerApplicationContextTests { @Test void hasServerNamespaceWhenContextIsNotWebServerApplicationContextReturnsFalse() { diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/test/java/smoketest/rsocket/SampleRSocketApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/test/java/smoketest/rsocket/SampleRSocketApplicationTests.java index 493b308a77..652f15c890 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/test/java/smoketest/rsocket/SampleRSocketApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/test/java/smoketest/rsocket/SampleRSocketApplicationTests.java @@ -31,7 +31,7 @@ import org.springframework.security.rsocket.metadata.UsernamePasswordMetadata; import org.springframework.util.MimeTypeUtils; @SpringBootTest(properties = "spring.rsocket.server.port=0") -public class SampleRSocketApplicationTests { +class SampleRSocketApplicationTests { @LocalRSocketServerPort private int port;