File tree Expand file tree Collapse file tree 6 files changed +18
-18
lines changed
jersey2-java8-localdatetime/src/main/java/org/openapitools/client
jersey2-java8/src/main/java/org/openapitools/client
jersey3/src/main/java/org/openapitools/client
openapi3/client/petstore/java
jersey2-java8-swagger1/src/main/java/org/openapitools/client
jersey2-java8-swagger2/src/main/java/org/openapitools/client
jersey2-java8/src/main/java/org/openapitools/client Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -1213,10 +1213,8 @@ public <T> ApiResponse<T> invokeAPI(
12131213 try {
12141214 response = sendRequest (method , invocationBuilder , entity );
12151215
1216- final int statusCode = response .getStatusInfo ().getStatusCode ();
1217-
12181216 // If OAuth is used and a status 401 is received, renew the access token and retry the request
1219- if (authNames != null && statusCode == Status .UNAUTHORIZED .getStatusCode ()) {
1217+ if (authNames != null && response . getStatusInfo (). getStatusCode () == Status .UNAUTHORIZED .getStatusCode ()) {
12201218 for (String authName : authNames ) {
12211219 Authentication authentication = authentications .get (authName );
12221220 if (authentication instanceof OAuth ) {
@@ -1230,6 +1228,8 @@ public <T> ApiResponse<T> invokeAPI(
12301228 }
12311229 }
12321230 }
1231+
1232+ final int statusCode = response .getStatusInfo ().getStatusCode ();
12331233
12341234 Map <String , List <String >> responseHeaders = buildResponseHeaders (response );
12351235
Original file line number Diff line number Diff line change @@ -1213,10 +1213,8 @@ public <T> ApiResponse<T> invokeAPI(
12131213 try {
12141214 response = sendRequest (method , invocationBuilder , entity );
12151215
1216- final int statusCode = response .getStatusInfo ().getStatusCode ();
1217-
12181216 // If OAuth is used and a status 401 is received, renew the access token and retry the request
1219- if (authNames != null && statusCode == Status .UNAUTHORIZED .getStatusCode ()) {
1217+ if (authNames != null && response . getStatusInfo (). getStatusCode () == Status .UNAUTHORIZED .getStatusCode ()) {
12201218 for (String authName : authNames ) {
12211219 Authentication authentication = authentications .get (authName );
12221220 if (authentication instanceof OAuth ) {
@@ -1230,6 +1228,8 @@ public <T> ApiResponse<T> invokeAPI(
12301228 }
12311229 }
12321230 }
1231+
1232+ final int statusCode = response .getStatusInfo ().getStatusCode ();
12331233
12341234 Map <String , List <String >> responseHeaders = buildResponseHeaders (response );
12351235
Original file line number Diff line number Diff line change @@ -1295,10 +1295,8 @@ public <T> ApiResponse<T> invokeAPI(
12951295 try {
12961296 response = sendRequest (method , invocationBuilder , entity );
12971297
1298- final int statusCode = response .getStatusInfo ().getStatusCode ();
1299-
13001298 // If OAuth is used and a status 401 is received, renew the access token and retry the request
1301- if (authNames != null && statusCode == Status .UNAUTHORIZED .getStatusCode ()) {
1299+ if (authNames != null && response . getStatusInfo (). getStatusCode () == Status .UNAUTHORIZED .getStatusCode ()) {
13021300 for (String authName : authNames ) {
13031301 Authentication authentication = authentications .get (authName );
13041302 if (authentication instanceof OAuth ) {
@@ -1313,6 +1311,8 @@ public <T> ApiResponse<T> invokeAPI(
13131311 }
13141312 }
13151313
1314+ final int statusCode = response .getStatusInfo ().getStatusCode ();
1315+
13161316 Map <String , List <String >> responseHeaders = buildResponseHeaders (response );
13171317
13181318 if (statusCode == Status .NO_CONTENT .getStatusCode ()) {
Original file line number Diff line number Diff line change @@ -1197,10 +1197,8 @@ public <T> ApiResponse<T> invokeAPI(
11971197 try {
11981198 response = sendRequest (method , invocationBuilder , entity );
11991199
1200- final int statusCode = response .getStatusInfo ().getStatusCode ();
1201-
12021200 // If OAuth is used and a status 401 is received, renew the access token and retry the request
1203- if (authNames != null && statusCode == Status .UNAUTHORIZED .getStatusCode ()) {
1201+ if (authNames != null && response . getStatusInfo (). getStatusCode () == Status .UNAUTHORIZED .getStatusCode ()) {
12041202 for (String authName : authNames ) {
12051203 Authentication authentication = authentications .get (authName );
12061204 if (authentication instanceof OAuth ) {
@@ -1214,6 +1212,8 @@ public <T> ApiResponse<T> invokeAPI(
12141212 }
12151213 }
12161214 }
1215+
1216+ final int statusCode = response .getStatusInfo ().getStatusCode ();
12171217
12181218 Map <String , List <String >> responseHeaders = buildResponseHeaders (response );
12191219
Original file line number Diff line number Diff line change @@ -1197,10 +1197,8 @@ public <T> ApiResponse<T> invokeAPI(
11971197 try {
11981198 response = sendRequest (method , invocationBuilder , entity );
11991199
1200- final int statusCode = response .getStatusInfo ().getStatusCode ();
1201-
12021200 // If OAuth is used and a status 401 is received, renew the access token and retry the request
1203- if (authNames != null && statusCode == Status .UNAUTHORIZED .getStatusCode ()) {
1201+ if (authNames != null && response . getStatusInfo (). getStatusCode () == Status .UNAUTHORIZED .getStatusCode ()) {
12041202 for (String authName : authNames ) {
12051203 Authentication authentication = authentications .get (authName );
12061204 if (authentication instanceof OAuth ) {
@@ -1214,6 +1212,8 @@ public <T> ApiResponse<T> invokeAPI(
12141212 }
12151213 }
12161214 }
1215+
1216+ final int statusCode = response .getStatusInfo ().getStatusCode ();
12171217
12181218 Map <String , List <String >> responseHeaders = buildResponseHeaders (response );
12191219
Original file line number Diff line number Diff line change @@ -1295,10 +1295,8 @@ public <T> ApiResponse<T> invokeAPI(
12951295 try {
12961296 response = sendRequest (method , invocationBuilder , entity );
12971297
1298- final int statusCode = response .getStatusInfo ().getStatusCode ();
1299-
13001298 // If OAuth is used and a status 401 is received, renew the access token and retry the request
1301- if (authNames != null && statusCode == Status .UNAUTHORIZED .getStatusCode ()) {
1299+ if (authNames != null && response . getStatusInfo (). getStatusCode () == Status .UNAUTHORIZED .getStatusCode ()) {
13021300 for (String authName : authNames ) {
13031301 Authentication authentication = authentications .get (authName );
13041302 if (authentication instanceof OAuth ) {
@@ -1312,6 +1310,8 @@ public <T> ApiResponse<T> invokeAPI(
13121310 }
13131311 }
13141312 }
1313+
1314+ final int statusCode = response .getStatusInfo ().getStatusCode ();
13151315
13161316 Map <String , List <String >> responseHeaders = buildResponseHeaders (response );
13171317
You can’t perform that action at this time.
0 commit comments