Skip to content

Commit

Permalink
Merge pull request #1976 from nidhiazad/feature/ELY-2619_GHC_Nidhi_Azad
Browse files Browse the repository at this point in the history
ELY-2619 : Immediately return this expression instead of assigning it to the temporary variable
  • Loading branch information
Skyllarr authored Sep 22, 2023
2 parents 37dc8b3 + 33e2923 commit 43808af
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 43808af

Please sign in to comment.