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...)`
This commit is contained in:
@@ -69,7 +69,7 @@ public abstract class RemoteFileOutboundGatewaySpec<F, S extends RemoteFileOutbo
|
||||
* @return the spec
|
||||
*/
|
||||
public S options(AbstractRemoteFileOutboundGateway.Option... options) {
|
||||
this.target.setOptions(options);
|
||||
this.target.setOption(options);
|
||||
return _this();
|
||||
}
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ public abstract class AbstractRemoteFileOutboundGateway<F> 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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user