Unify method visibility of private classes

Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
This commit is contained in:
Phillip Webb
2019-07-01 12:29:51 -07:00
parent 0a02a3a19c
commit a66c4d3096
910 changed files with 3754 additions and 3945 deletions

View File

@@ -70,7 +70,7 @@ class UserServiceAutoConfigurationTests {
static class UserConfiguration {
@Bean
public UserService myUserService() {
UserService myUserService() {
return new UserService("mine");
}

View File

@@ -51,12 +51,12 @@ class TomcatLegacyCookieProcessorExampleTests {
static class TestConfiguration {
@Bean
public TomcatServletWebServerFactory tomcatFactory() {
TomcatServletWebServerFactory tomcatFactory() {
return new TomcatServletWebServerFactory(0);
}
@Bean
public WebServerFactoryCustomizerBeanPostProcessor postProcessor() {
WebServerFactoryCustomizerBeanPostProcessor postProcessor() {
return new WebServerFactoryCustomizerBeanPostProcessor();
}

View File

@@ -43,7 +43,7 @@ class SampleWebClientConfiguration {
private static class ExampleController {
@RequestMapping("/example")
public ResponseEntity<String> example() {
ResponseEntity<String> example() {
return ResponseEntity.ok().location(URI.create("https://other.example.com/example")).body("test");
}

View File

@@ -56,7 +56,7 @@ class SampleWebClientTests {
static class Config {
@Bean
public RestTemplateBuilder restTemplateBuilder() {
RestTemplateBuilder restTemplateBuilder() {
return new RestTemplateBuilder().setConnectTimeout(Duration.ofSeconds(1))
.setReadTimeout(Duration.ofSeconds(1));
}