From 97db1da5b2287ca079ce720b0c68d85d76e1be80 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Tue, 31 May 2011 15:16:56 -0400 Subject: [PATCH] INT-1921 fixed FTP/SFTP adapters to have '/' as a default file separator character --- .../AbstractRemoteFileInboundChannelAdapterParser.java | 4 +--- .../integration/ftp/config/spring-integration-ftp-2.0.xsd | 2 +- .../config/FtpInboundChannelAdapterParserTests-context.xml | 2 +- .../ftp/config/FtpInboundChannelAdapterParserTests.java | 7 ++++++- .../sftp/config/spring-integration-sftp-2.0.xsd | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/config/AbstractRemoteFileInboundChannelAdapterParser.java b/spring-integration-file/src/main/java/org/springframework/integration/file/config/AbstractRemoteFileInboundChannelAdapterParser.java index 823b08f997..d5c344ef3e 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/config/AbstractRemoteFileInboundChannelAdapterParser.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/config/AbstractRemoteFileInboundChannelAdapterParser.java @@ -55,9 +55,7 @@ public abstract class AbstractRemoteFileInboundChannelAdapterParser extends Abst IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "remote-directory"); IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "delete-remote-files"); String remoteFileSeparator = element.getAttribute("remote-file-separator"); - if (remoteFileSeparator != null){ - synchronizerBuilder.addPropertyValue("remoteFileSeparator", remoteFileSeparator); - } + synchronizerBuilder.addPropertyValue("remoteFileSeparator", remoteFileSeparator); IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "temporary-file-suffix"); this.configureFilter(synchronizerBuilder, element, parserContext); diff --git a/spring-integration-ftp/src/main/resources/org/springframework/integration/ftp/config/spring-integration-ftp-2.0.xsd b/spring-integration-ftp/src/main/resources/org/springframework/integration/ftp/config/spring-integration-ftp-2.0.xsd index c5572402a7..d484bab46e 100644 --- a/spring-integration-ftp/src/main/resources/org/springframework/integration/ftp/config/spring-integration-ftp-2.0.xsd +++ b/spring-integration-ftp/src/main/resources/org/springframework/integration/ftp/config/spring-integration-ftp-2.0.xsd @@ -37,7 +37,7 @@ - + Allows you to provide remote file/directory separator character. DEFAULT: '/' diff --git a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpInboundChannelAdapterParserTests-context.xml b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpInboundChannelAdapterParserTests-context.xml index d1ce5e8e4e..cf8c71a119 100644 --- a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpInboundChannelAdapterParserTests-context.xml +++ b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpInboundChannelAdapterParserTests-context.xml @@ -30,7 +30,7 @@ - spcas = ac.getBeansOfType(SourcePollingChannelAdapter.class); SourcePollingChannelAdapter adapter = null; for (String key : spcas.keySet()) { - if (!key.equals("ftpInbound")){ + if (!key.equals("ftpInbound") && !key.equals("simpleAdapter")){ adapter = spcas.get(key); } } diff --git a/spring-integration-sftp/src/main/resources/org/springframework/integration/sftp/config/spring-integration-sftp-2.0.xsd b/spring-integration-sftp/src/main/resources/org/springframework/integration/sftp/config/spring-integration-sftp-2.0.xsd index 419af7c29f..1058e4e31c 100644 --- a/spring-integration-sftp/src/main/resources/org/springframework/integration/sftp/config/spring-integration-sftp-2.0.xsd +++ b/spring-integration-sftp/src/main/resources/org/springframework/integration/sftp/config/spring-integration-sftp-2.0.xsd @@ -62,7 +62,7 @@ - + Allows you to provide remote file/directory separator character. DEFAULT: '/' @@ -230,7 +230,7 @@ endpoint itself is a Polling Consumer for a channel with a queue. - + Allows you to provide remote file/directory separator character. DEFAULT: '/'