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();
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue