From 33e292357bd947e84c6f7616317096bc886da80f Mon Sep 17 00:00:00 2001 From: Nidhi Date: Fri, 22 Sep 2023 15:54:07 -0700 Subject: [PATCH] ELY-2619 : Immediately return this expression instead of assigning it to the temporary variable --- .../java/org/wildfly/security/http/oidc/OidcHttpFacade.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcHttpFacade.java b/http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcHttpFacade.java index d27a3a9f200..a4c1b94bc1d 100644 --- a/http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcHttpFacade.java +++ b/http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcHttpFacade.java @@ -121,8 +121,7 @@ public Principal getPrincipal() { SecurityIdentityCallback securityIdentityCallback = new SecurityIdentityCallback(); IdentityCredentialCallback credentialCallback = new IdentityCredentialCallback(new BearerTokenCredential(OidcPrincipal.class.cast(principal).getOidcSecurityContext().getTokenString()), true); callbackHandler.handle(new Callback[]{credentialCallback, AuthenticationCompleteCallback.SUCCEEDED, securityIdentityCallback}); - SecurityIdentity securityIdentity = securityIdentityCallback.getSecurityIdentity(); - return securityIdentity; + return securityIdentityCallback.getSecurityIdentity(); } } catch (UnsupportedCallbackException | IOException e) { throw new RuntimeException(e);