Using pattern matching for instanceof
This commit is contained in:
committed by
Josh Cummings
parent
cd6f33c03e
commit
ea19f82b8a
+1
-2
@@ -127,10 +127,9 @@ public class JaasApiIntegrationFilter extends GenericFilterBean {
|
||||
if (!authentication.isAuthenticated()) {
|
||||
return null;
|
||||
}
|
||||
if (!(authentication instanceof JaasAuthenticationToken)) {
|
||||
if (!(authentication instanceof JaasAuthenticationToken token)) {
|
||||
return null;
|
||||
}
|
||||
JaasAuthenticationToken token = (JaasAuthenticationToken) authentication;
|
||||
LoginContext loginContext = token.getLoginContext();
|
||||
if (loginContext == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user