From ed548bb8043b85af463e9833ca13e25aefdc16d9 Mon Sep 17 00:00:00 2001 From: David Frascone Date: Tue, 23 Apr 2024 08:24:03 -0400 Subject: [PATCH] Fixed copy/paste error in Java Oauth generator Looks like bug was introduced in this commit, where the if statement was accidentally included in the second file of the PR: https://github.com/swagger-api/swagger-codegen-generators/pull/1235/files# --- .../handlebars/Java/libraries/retrofit2/auth/OAuth.mustache | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/handlebars/Java/libraries/retrofit2/auth/OAuth.mustache b/src/main/resources/handlebars/Java/libraries/retrofit2/auth/OAuth.mustache index 59c0984ae2..80ec7b3946 100644 --- a/src/main/resources/handlebars/Java/libraries/retrofit2/auth/OAuth.mustache +++ b/src/main/resources/handlebars/Java/libraries/retrofit2/auth/OAuth.mustache @@ -113,7 +113,6 @@ public class OAuth implements Interceptor { // 401/403 most likely indicates that access token has expired. Unless it happens two times in a row. if ( response != null && (response.code() == HTTP_UNAUTHORIZED || response.code() == HTTP_FORBIDDEN) && updateTokenAndRetryOnAuthorizationFailure ) { - if ( response != null && (response.code() == HTTP_UNAUTHORIZED || response.code() == HTTP_FORBIDDEN) && updateTokenAndRetryOnAuthorizationFailure ) { try { if (updateAccessToken(requestAccessToken)) { response.body().close();