From f96c42d156d0c8984af57e6b7a06191a240269be Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Fri, 11 Nov 2016 12:06:59 -0500 Subject: [PATCH] Rename `setOptions(Option...)` to `setOption()` Since Spring XML properties population is based on the JavaBeans convention, two setters with the same name but different argument types clashes and we can sporadically end up with: ``` java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway$Option' for property 'options[0]': no matching editors or conversion strategy found ``` So, rename the new method for Java configuration to the `setOption(Option...)` --- .../integration/file/dsl/RemoteFileOutboundGatewaySpec.java | 2 +- .../file/remote/gateway/AbstractRemoteFileOutboundGateway.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/dsl/RemoteFileOutboundGatewaySpec.java b/spring-integration-file/src/main/java/org/springframework/integration/file/dsl/RemoteFileOutboundGatewaySpec.java index c4b5fe88e1..2ea484989c 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/dsl/RemoteFileOutboundGatewaySpec.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/dsl/RemoteFileOutboundGatewaySpec.java @@ -69,7 +69,7 @@ public abstract class RemoteFileOutboundGatewaySpec extends AbstractReply * @param options the {@link Option} array to use. * @since 5.0 */ - public void setOptions(Option... options) { + public void setOption(Option... options) { Assert.notNull(options, "'options' must not be null"); Assert.noNullElements(options, "'options' cannot contain null element");