BAEL-5301 Fix indentation
This commit is contained in:
parent
a95db4fe73
commit
e677f7a3ea
|
@ -15,12 +15,12 @@ public class Custom5xxErrorDecoder implements ErrorDecoder {
|
||||||
int status = response.status();
|
int status = response.status();
|
||||||
if (status >= 500) {
|
if (status >= 500) {
|
||||||
return new RetryableException(
|
return new RetryableException(
|
||||||
response.status(),
|
response.status(),
|
||||||
exception.getMessage(),
|
exception.getMessage(),
|
||||||
response.request().httpMethod(),
|
response.request().httpMethod(),
|
||||||
exception,
|
exception,
|
||||||
null,
|
null,
|
||||||
response.request());
|
response.request());
|
||||||
}
|
}
|
||||||
return exception;
|
return exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,11 @@ public class ResilientFeignClientBuilder {
|
||||||
|
|
||||||
public static <T> T createClient(Class<T> type, String uri) {
|
public static <T> T createClient(Class<T> type, String uri) {
|
||||||
return Feign.builder()
|
return Feign.builder()
|
||||||
.client(new OkHttpClient())
|
.client(new OkHttpClient())
|
||||||
.encoder(new GsonEncoder())
|
.encoder(new GsonEncoder())
|
||||||
.decoder(new GsonDecoder())
|
.decoder(new GsonDecoder())
|
||||||
.retryer(new Retryer.Default(100L, TimeUnit.SECONDS.toMillis(3L), 5))
|
.retryer(new Retryer.Default(100L, TimeUnit.SECONDS.toMillis(3L), 5))
|
||||||
.errorDecoder(new Custom5xxErrorDecoder())
|
.errorDecoder(new Custom5xxErrorDecoder())
|
||||||
.target(type, uri);
|
.target(type, uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class Custom5xxErrorDecoderUnitTest {
|
||||||
private Response responseStub(int status) {
|
private Response responseStub(int status) {
|
||||||
return Response.builder()
|
return Response.builder()
|
||||||
.request(Request.create(
|
.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)
|
.status(status)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue