Reduce method visibility when possible
Reduce method visibility for package private classes when possible. In the case of abstract classes that will eventually be made public, the class has been made public and a package-private constructor has been added. Issue gh-8945
This commit is contained in:
@@ -51,7 +51,7 @@ public class WithMockUserParentTests extends WithMockUserParent {
|
||||
static class Config {
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
@@ -81,7 +81,7 @@ public class WithMockUserTests {
|
||||
static class Config {
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
@@ -86,15 +86,12 @@ public class WithUserDetailsTests {
|
||||
static class Config {
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.userDetailsService(myUserDetailsService());
|
||||
// @formatter:on
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth.userDetailsService(myUserDetailsService());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public UserDetailsService myUserDetailsService() {
|
||||
UserDetailsService myUserDetailsService() {
|
||||
return new CustomUserDetailsService();
|
||||
}
|
||||
|
||||
|
||||
@@ -163,12 +163,11 @@ public class WithSecurityContextTestExcecutionListenerTests {
|
||||
|
||||
static class FakeTest {
|
||||
|
||||
public void testNoAnnotation() {
|
||||
void testNoAnnotation() {
|
||||
}
|
||||
|
||||
@WithMockUser
|
||||
public void testWithMockUser() {
|
||||
|
||||
void testWithMockUser() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public class Sec2935Tests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth.inMemoryAuthentication();
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class SecurityMockMvcRequestPostProcessorsAuthenticationStatelessTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication();
|
||||
@@ -96,7 +96,7 @@ public class SecurityMockMvcRequestPostProcessorsAuthenticationStatelessTests {
|
||||
static class Controller {
|
||||
|
||||
@RequestMapping
|
||||
public String hello() {
|
||||
String hello() {
|
||||
return "Hello";
|
||||
}
|
||||
|
||||
|
||||
@@ -83,18 +83,15 @@ public class SecurityMockMvcRequestPostProcessorsTestSecurityContextStatelessTes
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication();
|
||||
// @formatter:on
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth.inMemoryAuthentication();
|
||||
}
|
||||
|
||||
@RestController
|
||||
static class Controller {
|
||||
|
||||
@RequestMapping
|
||||
public String hello() {
|
||||
String hello() {
|
||||
return "Hello";
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public class SecurityMockMvcResultMatchersTests {
|
||||
static class Controller {
|
||||
|
||||
@RequestMapping("/")
|
||||
public String ok() {
|
||||
String ok() {
|
||||
return "ok";
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ public class SecurityMockWithAuthoritiesMvcResultMatchersTests {
|
||||
static class Controller {
|
||||
|
||||
@RequestMapping("/")
|
||||
public String ok() {
|
||||
String ok() {
|
||||
return "ok";
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class CsrfShowcaseTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
@@ -86,7 +86,7 @@ public class CustomCsrfShowcaseTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
@@ -95,7 +95,7 @@ public class CustomCsrfShowcaseTests {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CsrfTokenRepository repo() {
|
||||
CsrfTokenRepository repo() {
|
||||
HttpSessionCsrfTokenRepository repo = new HttpSessionCsrfTokenRepository();
|
||||
repo.setParameterName("custom_csrf");
|
||||
return repo;
|
||||
|
||||
@@ -75,7 +75,7 @@ public class DefaultCsrfShowcaseTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
@@ -117,7 +117,7 @@ public class CustomConfigAuthenticationTests {
|
||||
// @formatter:on
|
||||
|
||||
@Bean
|
||||
public SecurityContextRepository securityContextRepository() {
|
||||
SecurityContextRepository securityContextRepository() {
|
||||
HttpSessionSecurityContextRepository repo = new HttpSessionSecurityContextRepository();
|
||||
repo.setSpringSecurityContextKey("CUSTOM");
|
||||
return repo;
|
||||
|
||||
@@ -101,7 +101,7 @@ public class DefaultfSecurityRequestsTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
@@ -118,7 +118,7 @@ public class SecurityRequestsTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
@@ -102,7 +102,7 @@ public class WithUserAuthenticationTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
@@ -102,7 +102,7 @@ public class WithUserClassLevelAuthenticationTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
@@ -99,7 +99,7 @@ public class WithUserDetailsAuthenticationTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
@@ -98,7 +98,7 @@ public class WithUserDetailsClassLevelAuthenticationTests {
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// @formatter:off
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
|
||||
Reference in New Issue
Block a user