Skip to content

Commit dde744e

Browse files
committed
Merge statements.
1 parent acd52f9 commit dde744e

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

oauth/src/main/java/ch/cyberduck/core/oauth/BrowserOAuth2AuthorizationCodeProvider.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,10 @@ protected void open(final String authorizationCodeRequestUrl) throws LoginCancel
4242
@Override
4343
public String prompt(final Host bookmark, final LoginCallback prompt, final String authorizationCodeUrl, final String redirectUri, final String state) throws BackgroundException {
4444
log.debug("Evaluate redirect URI {}", redirectUri);
45-
if(StringUtils.endsWith(URIEncoder.decode(redirectUri), ":oauth")) {
46-
return new CustomSchemeHandlerOAuth2AuthorizationCodeProvider().prompt(
47-
bookmark, prompt, authorizationCodeUrl, redirectUri, state);
48-
}
49-
if(StringUtils.contains(redirectUri, "://oauth")) {
50-
return new CustomSchemeHandlerOAuth2AuthorizationCodeProvider().prompt(
51-
bookmark, prompt, authorizationCodeUrl, redirectUri, state);
45+
if(StringUtils.endsWith(URIEncoder.decode(redirectUri), ":oauth") || StringUtils.contains(redirectUri, "://oauth")) {
46+
return new CustomSchemeHandlerOAuth2AuthorizationCodeProvider().prompt(bookmark, prompt, authorizationCodeUrl, redirectUri, state);
5247
}
5348
log.debug("Prompt for authentication code for state {}", state);
54-
return new PromptOAuth2AuthorizationCodeProvider().prompt(
55-
bookmark, prompt, authorizationCodeUrl, redirectUri, state);
49+
return new PromptOAuth2AuthorizationCodeProvider().prompt(bookmark, prompt, authorizationCodeUrl, redirectUri, state);
5650
}
5751
}

0 commit comments

Comments
 (0)