diff --git a/acl/src/main/java/org/springframework/security/acls/domain/AclAuthorizationStrategyImpl.java b/acl/src/main/java/org/springframework/security/acls/domain/AclAuthorizationStrategyImpl.java index ea0d831644..92e621bc2d 100644 --- a/acl/src/main/java/org/springframework/security/acls/domain/AclAuthorizationStrategyImpl.java +++ b/acl/src/main/java/org/springframework/security/acls/domain/AclAuthorizationStrategyImpl.java @@ -73,7 +73,9 @@ public class AclAuthorizationStrategyImpl implements AclAuthorizationStrategy { this.gaGeneralChanges = auths[2]; } else { - this.gaTakeOwnership = this.gaModifyAuditing = this.gaGeneralChanges = auths[0]; + this.gaTakeOwnership = auths[0]; + this.gaModifyAuditing = auths[0]; + this.gaGeneralChanges = auths[0]; } } diff --git a/core/src/main/java/org/springframework/security/authentication/ProviderManager.java b/core/src/main/java/org/springframework/security/authentication/ProviderManager.java index 79b07a7d37..d7054dd37d 100644 --- a/core/src/main/java/org/springframework/security/authentication/ProviderManager.java +++ b/core/src/main/java/org/springframework/security/authentication/ProviderManager.java @@ -202,7 +202,8 @@ public class ProviderManager implements AuthenticationManager, MessageSourceAwar if (result == null && this.parent != null) { // Allow the parent to try. try { - result = parentResult = this.parent.authenticate(authentication); + parentResult = this.parent.authenticate(authentication); + result = parentResult; } catch (ProviderNotFoundException e) { // ignore as we will throw below if no other exception occurred prior to @@ -211,7 +212,8 @@ public class ProviderManager implements AuthenticationManager, MessageSourceAwar // handled the request } catch (AuthenticationException e) { - lastException = parentException = e; + parentException = e; + lastException = e; } } diff --git a/etc/checkstyle/checkstyle-suppressions.xml b/etc/checkstyle/checkstyle-suppressions.xml index fc3a5e9cc4..839b07e350 100644 --- a/etc/checkstyle/checkstyle-suppressions.xml +++ b/etc/checkstyle/checkstyle-suppressions.xml @@ -3,7 +3,6 @@ "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd"> - diff --git a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/CustomUserTypesOAuth2UserService.java b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/CustomUserTypesOAuth2UserService.java index b830f6bb6f..a4ec0ba734 100644 --- a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/CustomUserTypesOAuth2UserService.java +++ b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/CustomUserTypesOAuth2UserService.java @@ -83,8 +83,8 @@ public class CustomUserTypesOAuth2UserService implements OAuth2UserService customUserType; - if ((customUserType = this.customUserTypes.get(registrationId)) == null) { + Class customUserType = this.customUserTypes.get(registrationId); + if (customUserType == null) { return null; } diff --git a/remoting/src/main/java/org/springframework/security/remoting/rmi/ContextPropagatingRemoteInvocation.java b/remoting/src/main/java/org/springframework/security/remoting/rmi/ContextPropagatingRemoteInvocation.java index 844fd6ec42..a5f37c60c8 100644 --- a/remoting/src/main/java/org/springframework/security/remoting/rmi/ContextPropagatingRemoteInvocation.java +++ b/remoting/src/main/java/org/springframework/security/remoting/rmi/ContextPropagatingRemoteInvocation.java @@ -68,7 +68,8 @@ public class ContextPropagatingRemoteInvocation extends RemoteInvocation { this.credentials = userCredentials == null ? null : userCredentials.toString(); } else { - this.principal = this.credentials = null; + this.credentials = null; + this.principal = null; } if (logger.isDebugEnabled()) {