BAEL-5301 Fix indentation

This commit is contained in:
mdabrowski-eu 2022-01-24 23:27:48 +01:00
parent a95db4fe73
commit e677f7a3ea
3 changed files with 13 additions and 13 deletions

View File

@ -15,12 +15,12 @@ public class Custom5xxErrorDecoder implements ErrorDecoder {
int status = response.status();
if (status >= 500) {
return new RetryableException(
response.status(),
exception.getMessage(),
response.request().httpMethod(),
exception,
null,
response.request());
response.status(),
exception.getMessage(),
response.request().httpMethod(),
exception,
null,
response.request());
}
return exception;
}

View File

@ -18,11 +18,11 @@ public class ResilientFeignClientBuilder {
public static <T> T createClient(Class<T> type, String uri) {
return Feign.builder()
.client(new OkHttpClient())
.encoder(new GsonEncoder())
.decoder(new GsonDecoder())
.retryer(new Retryer.Default(100L, TimeUnit.SECONDS.toMillis(3L), 5))
.errorDecoder(new Custom5xxErrorDecoder())
.target(type, uri);
.client(new OkHttpClient())
.encoder(new GsonEncoder())
.decoder(new GsonDecoder())
.retryer(new Retryer.Default(100L, TimeUnit.SECONDS.toMillis(3L), 5))
.errorDecoder(new Custom5xxErrorDecoder())
.target(type, uri);
}
}

View File

@ -44,7 +44,7 @@ public class Custom5xxErrorDecoderUnitTest {
private Response responseStub(int status) {
return Response.builder()
.request(Request.create(
Request.HttpMethod.GET, "url", new HashMap<String, Collection<String>>(), new byte[0], Charset.defaultCharset(), new RequestTemplate()))
Request.HttpMethod.GET, "url", new HashMap<String, Collection<String>>(), new byte[0], Charset.defaultCharset(), new RequestTemplate()))
.status(status)
.build();
}