Skip to content

Commit

Permalink
ELY-2619 : Immediately return this expression instead of assigning it…
Browse files Browse the repository at this point in the history
… to the temporary variable
  • Loading branch information
Nidhi committed Sep 22, 2023
1 parent 37dc8b3 commit 33e2923
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 33e2923

Please sign in to comment.