From e677f7a3ea880349d66e1c5813c9bc80f8ba9a72 Mon Sep 17 00:00:00 2001 From: mdabrowski-eu Date: Mon, 24 Jan 2022 23:27:48 +0100 Subject: [PATCH] BAEL-5301 Fix indentation --- .../baeldung/feign/retry/Custom5xxErrorDecoder.java | 12 ++++++------ .../feign/retry/ResilientFeignClientBuilder.java | 12 ++++++------ .../feign/retry/Custom5xxErrorDecoderUnitTest.java | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/feign/src/main/java/com/baeldung/feign/retry/Custom5xxErrorDecoder.java b/feign/src/main/java/com/baeldung/feign/retry/Custom5xxErrorDecoder.java index c4edfe219f..6ff3c42ba1 100644 --- a/feign/src/main/java/com/baeldung/feign/retry/Custom5xxErrorDecoder.java +++ b/feign/src/main/java/com/baeldung/feign/retry/Custom5xxErrorDecoder.java @@ -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; } diff --git a/feign/src/main/java/com/baeldung/feign/retry/ResilientFeignClientBuilder.java b/feign/src/main/java/com/baeldung/feign/retry/ResilientFeignClientBuilder.java index edcaf13242..d8285d362a 100644 --- a/feign/src/main/java/com/baeldung/feign/retry/ResilientFeignClientBuilder.java +++ b/feign/src/main/java/com/baeldung/feign/retry/ResilientFeignClientBuilder.java @@ -18,11 +18,11 @@ public class ResilientFeignClientBuilder { public static T createClient(Class 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); } } diff --git a/feign/src/test/java/com/baeldung/feign/retry/Custom5xxErrorDecoderUnitTest.java b/feign/src/test/java/com/baeldung/feign/retry/Custom5xxErrorDecoderUnitTest.java index 0b67090268..b51a1a65b3 100644 --- a/feign/src/test/java/com/baeldung/feign/retry/Custom5xxErrorDecoderUnitTest.java +++ b/feign/src/test/java/com/baeldung/feign/retry/Custom5xxErrorDecoderUnitTest.java @@ -44,7 +44,7 @@ public class Custom5xxErrorDecoderUnitTest { private Response responseStub(int status) { return Response.builder() .request(Request.create( - Request.HttpMethod.GET, "url", new HashMap>(), new byte[0], Charset.defaultCharset(), new RequestTemplate())) + Request.HttpMethod.GET, "url", new HashMap>(), new byte[0], Charset.defaultCharset(), new RequestTemplate())) .status(status) .build(); }