diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/ApiErrorDecoder.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/ApiErrorDecoder.mustache index da87f2563b..3a0254773d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/ApiErrorDecoder.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/ApiErrorDecoder.mustache @@ -1,5 +1,7 @@ package {{invokerPackage}}.auth; +import java.util.Date; + import feign.Response; import feign.RetryableException; import feign.codec.ErrorDecoder; @@ -18,7 +20,7 @@ public class ApiErrorDecoder implements ErrorDecoder { Exception httpException = defaultErrorDecoder.decode(methodKey, response); if (response.status() == 401 || response.status() == 403) { return new RetryableException(response.status(), "Received status " + response.status() + " trying to renew access token", - response.request().httpMethod(), httpException, null, response.request()); + response.request().httpMethod(), httpException, (Date) null, response.request()); } return httpException; } diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/ApiErrorDecoder.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/ApiErrorDecoder.java index 2a33ff9434..b813327510 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/ApiErrorDecoder.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/ApiErrorDecoder.java @@ -1,5 +1,7 @@ package org.openapitools.client.auth; +import java.util.Date; + import feign.Response; import feign.RetryableException; import feign.codec.ErrorDecoder; @@ -18,7 +20,7 @@ public class ApiErrorDecoder implements ErrorDecoder { Exception httpException = defaultErrorDecoder.decode(methodKey, response); if (response.status() == 401 || response.status() == 403) { return new RetryableException(response.status(), "Received status " + response.status() + " trying to renew access token", - response.request().httpMethod(), httpException, null, response.request()); + response.request().httpMethod(), httpException, (Date) null, response.request()); } return httpException; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiErrorDecoder.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiErrorDecoder.java index 2a33ff9434..b813327510 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiErrorDecoder.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiErrorDecoder.java @@ -1,5 +1,7 @@ package org.openapitools.client.auth; +import java.util.Date; + import feign.Response; import feign.RetryableException; import feign.codec.ErrorDecoder; @@ -18,7 +20,7 @@ public class ApiErrorDecoder implements ErrorDecoder { Exception httpException = defaultErrorDecoder.decode(methodKey, response); if (response.status() == 401 || response.status() == 403) { return new RetryableException(response.status(), "Received status " + response.status() + " trying to renew access token", - response.request().httpMethod(), httpException, null, response.request()); + response.request().httpMethod(), httpException, (Date) null, response.request()); } return httpException; }