remove redundant modifiers found by checkstyle
This commit is contained in:
+2
-2
@@ -48,11 +48,11 @@ class MethodSecurityEvaluationContext extends StandardEvaluationContext {
|
||||
* for each instance. Use the constructor which takes the resolver, as an argument
|
||||
* thus allowing for caching.
|
||||
*/
|
||||
public MethodSecurityEvaluationContext(Authentication user, MethodInvocation mi) {
|
||||
MethodSecurityEvaluationContext(Authentication user, MethodInvocation mi) {
|
||||
this(user, mi, new DefaultSecurityParameterNameDiscoverer());
|
||||
}
|
||||
|
||||
public MethodSecurityEvaluationContext(Authentication user, MethodInvocation mi,
|
||||
MethodSecurityEvaluationContext(Authentication user, MethodInvocation mi,
|
||||
ParameterNameDiscoverer parameterNameDiscoverer) {
|
||||
this.mi = mi;
|
||||
this.parameterNameDiscoverer = parameterNameDiscoverer;
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ public final class DelegatingMethodSecurityMetadataSource extends
|
||||
private final Method method;
|
||||
private final Class<?> targetClass;
|
||||
|
||||
public DefaultCacheKey(Method method, Class<?> targetClass) {
|
||||
DefaultCacheKey(Method method, Class<?> targetClass) {
|
||||
this.method = method;
|
||||
this.targetClass = targetClass;
|
||||
}
|
||||
|
||||
+1
-1
@@ -287,7 +287,7 @@ public class MapBasedMethodSecurityMetadataSource extends
|
||||
private final Method method;
|
||||
private final Class<?> registeredJavaType;
|
||||
|
||||
public RegisteredMethod(Method method, Class<?> registeredJavaType) {
|
||||
RegisteredMethod(Method method, Class<?> registeredJavaType) {
|
||||
Assert.notNull(method, "Method required");
|
||||
Assert.notNull(registeredJavaType, "Registered Java Type required");
|
||||
this.method = method;
|
||||
|
||||
+1
-1
@@ -402,7 +402,7 @@ public abstract class AbstractJaasAuthenticationProvider
|
||||
private class InternalCallbackHandler implements CallbackHandler {
|
||||
private final Authentication authentication;
|
||||
|
||||
public InternalCallbackHandler(Authentication authentication) {
|
||||
InternalCallbackHandler(Authentication authentication) {
|
||||
this.authentication = authentication;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -61,24 +61,24 @@ public final class DelegatingSecurityContextScheduledExecutorService extends
|
||||
this(delegate, null);
|
||||
}
|
||||
|
||||
public final ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
|
||||
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
|
||||
command = wrap(command);
|
||||
return getDelegate().schedule(command, delay, unit);
|
||||
}
|
||||
|
||||
public final <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay,
|
||||
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay,
|
||||
TimeUnit unit) {
|
||||
callable = wrap(callable);
|
||||
return getDelegate().schedule(callable, delay, unit);
|
||||
}
|
||||
|
||||
public final ScheduledFuture<?> scheduleAtFixedRate(Runnable command,
|
||||
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command,
|
||||
long initialDelay, long period, TimeUnit unit) {
|
||||
command = wrap(command);
|
||||
return getDelegate().scheduleAtFixedRate(command, initialDelay, period, unit);
|
||||
}
|
||||
|
||||
public final ScheduledFuture<?> scheduleWithFixedDelay(Runnable command,
|
||||
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command,
|
||||
long initialDelay, long delay, TimeUnit unit) {
|
||||
command = wrap(command);
|
||||
return getDelegate().scheduleWithFixedDelay(command, initialDelay, delay, unit);
|
||||
@@ -87,4 +87,4 @@ public final class DelegatingSecurityContextScheduledExecutorService extends
|
||||
private ScheduledExecutorService getDelegate() {
|
||||
return (ScheduledExecutorService) getDelegateExecutor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ class ComparableVersion implements Comparable<ComparableVersion> {
|
||||
this.value = BigInteger_ZERO;
|
||||
}
|
||||
|
||||
public IntegerItem(String str) {
|
||||
IntegerItem(String str) {
|
||||
this.value = new BigInteger(str);
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ class ComparableVersion implements Comparable<ComparableVersion> {
|
||||
|
||||
private String value;
|
||||
|
||||
public StringItem(String value, boolean followedByDigit) {
|
||||
StringItem(String value, boolean followedByDigit) {
|
||||
if (followedByDigit && value.length() == 1) {
|
||||
// a1 = alpha-1, b1 = beta-1, m1 = milestone-1
|
||||
switch (value.charAt(0)) {
|
||||
@@ -341,7 +341,7 @@ class ComparableVersion implements Comparable<ComparableVersion> {
|
||||
}
|
||||
}
|
||||
|
||||
public ComparableVersion(String version) {
|
||||
ComparableVersion(String version) {
|
||||
parseVersion(version);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ class AnonymousAuthenticationTokenMixin {
|
||||
* @param authorities the authorities granted to the principal
|
||||
*/
|
||||
@JsonCreator
|
||||
public AnonymousAuthenticationTokenMixin(@JsonProperty("keyHash") Integer keyHash, @JsonProperty("principal") Object principal,
|
||||
AnonymousAuthenticationTokenMixin(@JsonProperty("keyHash") Integer keyHash, @JsonProperty("principal") Object principal,
|
||||
@JsonProperty("authorities") Collection<? extends GrantedAuthority> authorities) {
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ class RememberMeAuthenticationTokenMixin {
|
||||
* @param authorities the authorities granted to the principal
|
||||
*/
|
||||
@JsonCreator
|
||||
public RememberMeAuthenticationTokenMixin(@JsonProperty("keyHash") Integer keyHash,
|
||||
RememberMeAuthenticationTokenMixin(@JsonProperty("keyHash") Integer keyHash,
|
||||
@JsonProperty("principal") Object principal,
|
||||
@JsonProperty("authorities") Collection<? extends GrantedAuthority> authorities) {
|
||||
}
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ public final class SecurityJackson2Modules {
|
||||
*/
|
||||
static class WhitelistTypeResolverBuilder extends ObjectMapper.DefaultTypeResolverBuilder {
|
||||
|
||||
public WhitelistTypeResolverBuilder(ObjectMapper.DefaultTyping defaultTyping) {
|
||||
WhitelistTypeResolverBuilder(ObjectMapper.DefaultTyping defaultTyping) {
|
||||
super(defaultTyping);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class MutableUser implements MutableUserDetails {
|
||||
private String password;
|
||||
private final UserDetails delegate;
|
||||
|
||||
public MutableUser(UserDetails user) {
|
||||
MutableUser(UserDetails user) {
|
||||
this.delegate = user;
|
||||
this.password = user.getPassword();
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class SecurityConfigTests {
|
||||
private class MockConfigAttribute implements ConfigAttribute {
|
||||
private String attribute;
|
||||
|
||||
public MockConfigAttribute(String configuration) {
|
||||
MockConfigAttribute(String configuration) {
|
||||
this.attribute = configuration;
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -35,31 +35,31 @@ public interface BusinessService extends Serializable {
|
||||
@Secured({ "ROLE_ADMIN" })
|
||||
@RolesAllowed({ "ROLE_ADMIN" })
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
public void someAdminMethod();
|
||||
void someAdminMethod();
|
||||
|
||||
@Secured({ "ROLE_USER", "ROLE_ADMIN" })
|
||||
@RolesAllowed({ "ROLE_USER", "ROLE_ADMIN" })
|
||||
public void someUserAndAdminMethod();
|
||||
void someUserAndAdminMethod();
|
||||
|
||||
@Secured({ "ROLE_USER" })
|
||||
@RolesAllowed({ "ROLE_USER" })
|
||||
public void someUserMethod1();
|
||||
void someUserMethod1();
|
||||
|
||||
@Secured({ "ROLE_USER" })
|
||||
@RolesAllowed({ "ROLE_USER" })
|
||||
public void someUserMethod2();
|
||||
void someUserMethod2();
|
||||
|
||||
@RolesAllowed({ "USER" })
|
||||
public void rolesAllowedUser();
|
||||
void rolesAllowedUser();
|
||||
|
||||
public int someOther(String s);
|
||||
int someOther(String s);
|
||||
|
||||
public int someOther(int input);
|
||||
int someOther(int input);
|
||||
|
||||
public List<?> methodReturningAList(List<?> someList);
|
||||
List<?> methodReturningAList(List<?> someList);
|
||||
|
||||
public Object[] methodReturningAnArray(Object[] someArray);
|
||||
Object[] methodReturningAnArray(Object[] someArray);
|
||||
|
||||
public List<?> methodReturningAList(String userName, String extraParam);
|
||||
List<?> methodReturningAList(String userName, String extraParam);
|
||||
|
||||
}
|
||||
|
||||
+5
-5
@@ -218,7 +218,7 @@ public class SecuredAnnotationSecurityMetadataSourceTests {
|
||||
// Inner classes
|
||||
class Department extends Entity {
|
||||
|
||||
public Department(String name) {
|
||||
Department(String name) {
|
||||
super(name);
|
||||
}
|
||||
}
|
||||
@@ -285,15 +285,15 @@ public class SecuredAnnotationSecurityMetadataSourceTests {
|
||||
public @interface AnnotatedAnnotation {
|
||||
}
|
||||
|
||||
public static interface ReturnVoid {
|
||||
public interface ReturnVoid {
|
||||
|
||||
public void doSomething(List<?> param);
|
||||
void doSomething(List<?> param);
|
||||
}
|
||||
|
||||
@AnnotatedAnnotation
|
||||
public static interface ReturnVoid2 {
|
||||
public interface ReturnVoid2 {
|
||||
|
||||
public void doSomething(List<?> param);
|
||||
void doSomething(List<?> param);
|
||||
}
|
||||
|
||||
@AnnotatedAnnotation
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class MethodSecurityEvaluationContextTests {
|
||||
private static class NotNullVariableMethodSecurityEvaluationContext
|
||||
extends MethodSecurityEvaluationContext {
|
||||
|
||||
public NotNullVariableMethodSecurityEvaluationContext(Authentication auth, MethodInvocation mi,
|
||||
NotNullVariableMethodSecurityEvaluationContext(Authentication auth, MethodInvocation mi,
|
||||
ParameterNameDiscoverer parameterNameDiscoverer) {
|
||||
super(auth, mi, parameterNameDiscoverer);
|
||||
}
|
||||
|
||||
+8
-8
@@ -203,19 +203,19 @@ public class PrePostAnnotationSecurityMetadataSourceTests {
|
||||
// ~ Inner Classes
|
||||
// ==================================================================================================
|
||||
|
||||
public static interface ReturnVoid {
|
||||
public void doSomething(List<?> param);
|
||||
public interface ReturnVoid {
|
||||
void doSomething(List<?> param);
|
||||
}
|
||||
|
||||
public static interface ReturnAList {
|
||||
public List<?> doSomething(List<?> param);
|
||||
public interface ReturnAList {
|
||||
List<?> doSomething(List<?> param);
|
||||
}
|
||||
|
||||
@PreAuthorize("interfaceAuthzExpression")
|
||||
public static interface ReturnAnotherList {
|
||||
public interface ReturnAnotherList {
|
||||
@PreAuthorize("interfaceMethodAuthzExpression")
|
||||
@PreFilter(filterTarget = "param", value = "interfacePreFilterExpression")
|
||||
public List<?> doSomething(List<?> param);
|
||||
List<?> doSomething(List<?> param);
|
||||
}
|
||||
|
||||
@PreAuthorize("someExpression")
|
||||
@@ -275,8 +275,8 @@ public class PrePostAnnotationSecurityMetadataSourceTests {
|
||||
}
|
||||
|
||||
@CustomAnnotation
|
||||
public static interface ReturnVoid2 {
|
||||
public void doSomething(List<?> param);
|
||||
public interface ReturnVoid2 {
|
||||
void doSomething(List<?> param);
|
||||
}
|
||||
|
||||
@CustomAnnotation
|
||||
|
||||
+1
-2
@@ -179,8 +179,7 @@ public class AfterInvocationProviderManagerTests {
|
||||
|
||||
private Object forceReturnObject;
|
||||
|
||||
public MockAfterInvocationProvider(Object forceReturnObject, Class secureObject,
|
||||
ConfigAttribute configAttribute) {
|
||||
MockAfterInvocationProvider(Object forceReturnObject, Class secureObject, ConfigAttribute configAttribute) {
|
||||
this.forceReturnObject = forceReturnObject;
|
||||
this.secureObject = secureObject;
|
||||
this.configAttribute = configAttribute;
|
||||
|
||||
+1
-2
@@ -156,8 +156,7 @@ public class AbstractAuthenticationTokenTests {
|
||||
private Object credentials;
|
||||
private Object principal;
|
||||
|
||||
public MockAuthenticationImpl(Object principal, Object credentials,
|
||||
List<GrantedAuthority> authorities) {
|
||||
MockAuthenticationImpl(Object principal, Object credentials, List<GrantedAuthority> authorities) {
|
||||
super(authorities);
|
||||
this.principal = principal;
|
||||
this.credentials = credentials;
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ public class DefaultAuthenticationEventPublisherTests {
|
||||
|
||||
private static final class MockAuthenticationException extends
|
||||
AuthenticationException {
|
||||
public MockAuthenticationException(String msg) {
|
||||
MockAuthenticationException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -290,7 +290,7 @@ public class JaasAuthenticationProviderTests {
|
||||
private static class MockLoginContext extends LoginContext {
|
||||
boolean loggedOut = false;
|
||||
|
||||
public MockLoginContext(String loginModule) throws LoginException {
|
||||
MockLoginContext(String loginModule) throws LoginException {
|
||||
super(loginModule);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ public class RemoteAuthenticationProviderTests {
|
||||
private class MockRemoteAuthenticationManager implements RemoteAuthenticationManager {
|
||||
private boolean grantAccess;
|
||||
|
||||
public MockRemoteAuthenticationManager(boolean grantAccess) {
|
||||
MockRemoteAuthenticationManager(boolean grantAccess) {
|
||||
this.grantAccess = grantAccess;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -62,8 +62,8 @@ public class DelegatingSecurityContextSupportTests extends
|
||||
|
||||
private static class ConcreteDelegatingSecurityContextSupport extends
|
||||
AbstractDelegatingSecurityContextSupport {
|
||||
public ConcreteDelegatingSecurityContextSupport(SecurityContext securityContext) {
|
||||
ConcreteDelegatingSecurityContextSupport(SecurityContext securityContext) {
|
||||
super(securityContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -148,10 +148,10 @@ public class AnnotationParameterNameDiscovererTests {
|
||||
}
|
||||
|
||||
static class Impl {
|
||||
public Impl(Long dataSourceId) {
|
||||
Impl(Long dataSourceId) {
|
||||
}
|
||||
|
||||
public Impl(@P("id") String dataSourceId) {
|
||||
Impl(@P("id") String dataSourceId) {
|
||||
}
|
||||
|
||||
String findMessageByTo(@P("to") String to) {
|
||||
|
||||
Reference in New Issue
Block a user