Skip to content

Commit dfe5ba4

Browse files
Simply if condition
Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent 8373336 commit dfe5ba4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/web/server/BearerTokenServerAuthenticationEntryPoint.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ private Map<String, String> createParameters(AuthenticationException authExcepti
8282
if (StringUtils.hasText(error.getUri())) {
8383
parameters.put("error_uri", error.getUri());
8484
}
85-
if (error instanceof BearerTokenError bearerTokenError) {
86-
if (StringUtils.hasText(bearerTokenError.getScope())) {
87-
parameters.put("scope", bearerTokenError.getScope());
88-
}
85+
if (error instanceof BearerTokenError bearerTokenError
86+
&& StringUtils.hasText(bearerTokenError.getScope())) {
87+
parameters.put("scope", bearerTokenError.getScope());
8988
}
9089
}
9190
return parameters;

0 commit comments

Comments
 (0)