From 563cfb7479f0c9b6105c7c3f9d4eba6765599f3f Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Thu, 13 Jun 2019 16:16:27 -0400 Subject: [PATCH] Formatting --- .../filter/factory/HystrixGatewayFilterFactory.java | 10 ++++++---- .../RetryGatewayFilterFactoryIntegrationTests.java | 4 ++-- .../cloud/gateway/mvc/ProxyExchange.java | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactory.java b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactory.java index c093e91f..5fccc71f 100644 --- a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactory.java +++ b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactory.java @@ -102,8 +102,9 @@ public class HystrixGatewayFilterFactory /** * Create a {@link Setter} based on incoming request attribute.
* This could be useful for example to create a Setter with {@link HystrixCommandKey} - * being set as the target service's host:port, as obtained from {@link ServerWebExchange#getRequest()} - * to do per service instance level circuit breaking. + * being set as the target service's host:port, as obtained from + * {@link ServerWebExchange#getRequest()} to do per service instance level circuit + * breaking. */ protected Setter createCommandSetter(Config config, ServerWebExchange exchange) { return config.setter; @@ -124,8 +125,9 @@ public class HystrixGatewayFilterFactory } return (exchange, chain) -> { - RouteHystrixCommand command = new RouteHystrixCommand(createCommandSetter(config, exchange), - config.fallbackUri, exchange, chain); + RouteHystrixCommand command = new RouteHystrixCommand( + createCommandSetter(config, exchange), config.fallbackUri, exchange, + chain); return Mono.create(s -> { Subscription sub = command.toObservable().subscribe(s::success, s::error, diff --git a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/RetryGatewayFilterFactoryIntegrationTests.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/RetryGatewayFilterFactoryIntegrationTests.java index dcaa2e5f..f81d5b20 100644 --- a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/RetryGatewayFilterFactoryIntegrationTests.java +++ b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/RetryGatewayFilterFactoryIntegrationTests.java @@ -66,8 +66,8 @@ public class RetryGatewayFilterFactoryIntegrationTests extends BaseWebClientTest @Test public void retryFilterFailure() { - testClient.mutate().responseTimeout(Duration.ofSeconds(10)).build() - .get().uri("/retryalwaysfail?key=getjavafailure&count=4") + testClient.mutate().responseTimeout(Duration.ofSeconds(10)).build().get() + .uri("/retryalwaysfail?key=getjavafailure&count=4") .header(HttpHeaders.HOST, "www.retryjava.org").exchange().expectStatus() .is5xxServerError().expectBody(String.class).consumeWith(result -> { assertThat(result.getResponseBody()).contains("permanently broken"); diff --git a/spring-cloud-gateway-mvc/src/main/java/org/springframework/cloud/gateway/mvc/ProxyExchange.java b/spring-cloud-gateway-mvc/src/main/java/org/springframework/cloud/gateway/mvc/ProxyExchange.java index e8a3f820..b7efe59d 100644 --- a/spring-cloud-gateway-mvc/src/main/java/org/springframework/cloud/gateway/mvc/ProxyExchange.java +++ b/spring-cloud-gateway-mvc/src/main/java/org/springframework/cloud/gateway/mvc/ProxyExchange.java @@ -222,7 +222,7 @@ public class ProxyExchange { } return this; } - + /** * Sets the uri for the backend call when triggered by the HTTP methods. * @param uri the backend uri to send the request to