Avoid inner assignments

Replace code of the form `a = b =c` with distinct statements. Although
this results in more lines of code, they are usually easier to
understand.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-08-05 20:56:42 -07:00
committed by Rob Winch
parent 9e08b51ed3
commit 418c3d6808
5 changed files with 11 additions and 7 deletions

View File

@@ -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;
}
}