Skip to content

Commit dd828fa

Browse files
committed
Simplify expression.
1 parent 2637ae9 commit dd828fa

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,7 @@ public void process(final HttpRequest request, final HttpContext context) throws
123123
try {
124124
if(tokens.isExpired()) {
125125
try {
126-
final OAuthTokens previous = tokens;
127-
final OAuthTokens refreshed = this.refresh(tokens);
128-
// Skip saving tokens when not changed
129-
if(!refreshed.equals(previous)) {
130-
this.save(refreshed);
131-
}
126+
this.save(this.refresh(tokens));
132127
}
133128
catch(BackgroundException e) {
134129
log.warn("Failure {} refreshing OAuth tokens {}", e, tokens);

0 commit comments

Comments
 (0)