Make classes final where possible
Update classes that have private constructors so that they are also declared final. In a few cases, inner-classes used private constructors but were subclassed. These have now been changed to have package-private constructors. Issue gh-8945
This commit is contained in:
@@ -34,6 +34,9 @@ public class AuthenticatedReactiveAuthorizationManager<T> implements ReactiveAut
|
||||
|
||||
private AuthenticationTrustResolver authTrustResolver = new AuthenticationTrustResolverImpl();
|
||||
|
||||
AuthenticatedReactiveAuthorizationManager() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<AuthorizationDecision> check(Mono<Authentication> authentication, T object) {
|
||||
return authentication.filter(this::isNotAnonymous).map(a -> new AuthorizationDecision(a.isAuthenticated()))
|
||||
@@ -59,7 +62,4 @@ public class AuthenticatedReactiveAuthorizationManager<T> implements ReactiveAut
|
||||
return new AuthenticatedReactiveAuthorizationManager<>();
|
||||
}
|
||||
|
||||
private AuthenticatedReactiveAuthorizationManager() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class AuthorityReactiveAuthorizationManager<T> implements ReactiveAuthori
|
||||
|
||||
private final List<String> authorities;
|
||||
|
||||
private AuthorityReactiveAuthorizationManager(String... authorities) {
|
||||
AuthorityReactiveAuthorizationManager(String... authorities) {
|
||||
this.authorities = Arrays.asList(authorities);
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ public class User implements UserDetails, CredentialsContainer {
|
||||
* Builds the user to be added. At minimum the username, password, and authorities
|
||||
* should provided. The remaining attributes have reasonable defaults.
|
||||
*/
|
||||
public static class UserBuilder {
|
||||
public static final class UserBuilder {
|
||||
|
||||
private String username;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public class PopulatedDatabase {
|
||||
public final class PopulatedDatabase {
|
||||
|
||||
private static TestDataSource dataSource = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user