diff --git a/feign-reactor-core/src/main/java/reactivefeign/methodhandler/PublisherClientMethodHandler.java b/feign-reactor-core/src/main/java/reactivefeign/methodhandler/PublisherClientMethodHandler.java index 1ab9f0fe..7eb79a6d 100644 --- a/feign-reactor-core/src/main/java/reactivefeign/methodhandler/PublisherClientMethodHandler.java +++ b/feign-reactor-core/src/main/java/reactivefeign/methodhandler/PublisherClientMethodHandler.java @@ -189,8 +189,12 @@ private String queryLine(Map> queries) { Collection valuesEncoded = query.getValue().stream() .map(value -> UriUtils.encode(value, UTF_8)) .collect(toList()); - queryBuilder.append('&'); - queryBuilder.append(collectionFormat.join(query.getKey(), valuesEncoded, UTF_8)); + + CharSequence queryString = collectionFormat.join(query.getKey(), valuesEncoded, UTF_8); + if(queryString.length() > 0){ + queryBuilder.append('&'); + queryBuilder.append(queryString); + } } if(queryBuilder.length() > 0) { queryBuilder.deleteCharAt(0); diff --git a/feign-reactor-core/src/test/java/reactivefeign/allfeatures/AllFeaturesTest.java b/feign-reactor-core/src/test/java/reactivefeign/allfeatures/AllFeaturesTest.java index bd5b50fe..67021ef0 100644 --- a/feign-reactor-core/src/test/java/reactivefeign/allfeatures/AllFeaturesTest.java +++ b/feign-reactor-core/src/test/java/reactivefeign/allfeatures/AllFeaturesTest.java @@ -155,7 +155,7 @@ public void shouldPassEmptyParameterInUrl() { @Test public void shouldNotReturnNullPassedParametersNew() { - Map paramMap = new HashMap() { + Map paramMap = new HashMap<>() { { put("paramKey", "paramValue"); put("paramKeyNull", null); diff --git a/feign-reactor-spring-configuration/src/main/java/reactivefeign/spring/config/ReactiveFeignAutoConfiguration.java b/feign-reactor-spring-configuration/src/main/java/reactivefeign/spring/config/ReactiveFeignAutoConfiguration.java index 4d3b6dde..98f2680b 100644 --- a/feign-reactor-spring-configuration/src/main/java/reactivefeign/spring/config/ReactiveFeignAutoConfiguration.java +++ b/feign-reactor-spring-configuration/src/main/java/reactivefeign/spring/config/ReactiveFeignAutoConfiguration.java @@ -41,7 +41,7 @@ public ReactiveFeignNamedContextFactory reactiveFeignContext() { @Configuration @ConditionalOnClass(WebReactiveFeign.class) - public class WebClientReactiveFeignClientPropertiesAutoConfiguration { + public static class WebClientReactiveFeignClientPropertiesAutoConfiguration { @Bean @ConditionalOnMissingBean @@ -54,7 +54,7 @@ public ReactiveFeignClientsProperties webClientReact @Configuration @ConditionalOnClass(Java11ReactiveFeign.class) - public class Java11ReactiveFeignClientPropertiesAutoConfiguration { + public static class Java11ReactiveFeignClientPropertiesAutoConfiguration { @Bean @ConditionalOnMissingBean @@ -67,7 +67,7 @@ public ReactiveFeignClientsProperties java11React @Configuration @ConditionalOnClass(JettyReactiveFeign.class) - public class JettyReactiveFeignClientPropertiesAutoConfiguration { + public static class JettyReactiveFeignClientPropertiesAutoConfiguration { @Bean @ConditionalOnMissingBean