diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java b/spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java index b06a23657f..f3c282e057 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java @@ -93,7 +93,7 @@ public class FileWritingMessageHandler extends AbstractReplyProducingMessageHand this.temporaryFileSuffix = temporaryFileSuffix; } - public String getTemporaryFileSuffix() { + protected String getTemporaryFileSuffix() { return temporaryFileSuffix; } diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java index 59d699f55a..a8b07dc918 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java @@ -81,7 +81,7 @@ public class FileTransferringMessageHandler extends AbstractMessageHandler { this.directoryExpressionProcessor = new ExpressionEvaluatingMessageProcessor(remoteDirectoryExpression, String.class); } - public String getTemporaryFileSuffix() { + protected String getTemporaryFileSuffix() { return temporaryFileSuffix; } diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java index 4dc95175ed..6b17239b5b 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java @@ -121,7 +121,7 @@ public abstract class AbstractInboundFileSynchronizer implements InboundFileS return (this.filter != null) ? this.filter.filterFiles(files) : Arrays.asList(files); } - public String getTemporaryFileSuffix() { + protected String getTemporaryFileSuffix() { return temporaryFileSuffix; } diff --git a/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests.java b/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests.java index 0f59f3a0bc..a9fe462637 100644 --- a/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests.java +++ b/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests.java @@ -69,7 +69,7 @@ public class FileOutboundChannelAdapterParserTests { DirectFieldAccessor handlerAccessor = new DirectFieldAccessor(handler); File expected = new File(System.getProperty("java.io.tmpdir")); File actual = (File) handlerAccessor.getPropertyValue("destinationDirectory"); - assertEquals(".foo", handler.getTemporaryFileSuffix()); + assertEquals(".foo", TestUtils.getPropertyValue(handler, "temporaryFileSuffix", String.class)); assertThat(actual, is(expected)); DefaultFileNameGenerator fileNameGenerator = (DefaultFileNameGenerator) handlerAccessor.getPropertyValue("fileNameGenerator"); assertNotNull(fileNameGenerator); diff --git a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpInboundChannelAdapterParserTests.java b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpInboundChannelAdapterParserTests.java index 89c328e262..351e188ef7 100644 --- a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpInboundChannelAdapterParserTests.java +++ b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpInboundChannelAdapterParserTests.java @@ -58,7 +58,7 @@ public class FtpInboundChannelAdapterParserTests { FtpInboundFileSynchronizer fisync = (FtpInboundFileSynchronizer) TestUtils.getPropertyValue(inbound, "synchronizer"); - assertEquals(".foo", fisync.getTemporaryFileSuffix()); + assertEquals(".foo", TestUtils.getPropertyValue(fisync, "temporaryFileSuffix", String.class)); String remoteFileSeparator = (String) TestUtils.getPropertyValue(fisync, "remoteFileSeparator"); assertNotNull(remoteFileSeparator); assertEquals("", remoteFileSeparator); diff --git a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpOutboundChannelAdapterParserTests.java b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpOutboundChannelAdapterParserTests.java index 79bc955f3a..6c1100db1c 100644 --- a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpOutboundChannelAdapterParserTests.java +++ b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpOutboundChannelAdapterParserTests.java @@ -54,7 +54,7 @@ public class FtpOutboundChannelAdapterParserTests { FileTransferringMessageHandler handler = (FileTransferringMessageHandler) TestUtils.getPropertyValue(consumer, "handler"); String remoteFileSeparator = (String) TestUtils.getPropertyValue(handler, "remoteFileSeparator"); assertNotNull(remoteFileSeparator); - assertEquals(".foo", handler.getTemporaryFileSuffix()); + assertEquals(".foo", TestUtils.getPropertyValue(handler, "temporaryFileSuffix", String.class)); assertEquals(".", remoteFileSeparator); assertEquals(ac.getBean("fileNameGenerator"), TestUtils.getPropertyValue(handler, "fileNameGenerator")); assertEquals("UTF-8", TestUtils.getPropertyValue(handler, "charset")); diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/InboundChannelAdapterParserTests.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/InboundChannelAdapterParserTests.java index 2fd78c01b7..4ef787be00 100644 --- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/InboundChannelAdapterParserTests.java +++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/InboundChannelAdapterParserTests.java @@ -62,7 +62,7 @@ public class InboundChannelAdapterParserTests { SftpInboundFileSynchronizer synchronizer = (SftpInboundFileSynchronizer) TestUtils.getPropertyValue(source, "synchronizer"); String remoteFileSeparator = (String) TestUtils.getPropertyValue(synchronizer, "remoteFileSeparator"); - assertEquals(".bar", synchronizer.getTemporaryFileSuffix()); + assertEquals(".bar", TestUtils.getPropertyValue(synchronizer, "temporaryFileSuffix", String.class)); assertNotNull(remoteFileSeparator); assertEquals(".", remoteFileSeparator); PollableChannel requestChannel = context.getBean("requestChannel", PollableChannel.class); diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/OutboundChannelAdapterParserTests.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/OutboundChannelAdapterParserTests.java index 76d9718858..1a5f13abed 100644 --- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/OutboundChannelAdapterParserTests.java +++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/OutboundChannelAdapterParserTests.java @@ -61,7 +61,7 @@ public class OutboundChannelAdapterParserTests { String remoteFileSeparator = (String) TestUtils.getPropertyValue(handler, "remoteFileSeparator"); assertNotNull(remoteFileSeparator); assertEquals(".", remoteFileSeparator); - assertEquals(".bar", handler.getTemporaryFileSuffix()); + assertEquals(".bar", TestUtils.getPropertyValue(handler, "temporaryFileSuffix", String.class)); Expression remoteDirectoryExpression = (Expression) TestUtils.getPropertyValue(handler, "directoryExpressionProcessor.expression"); assertNotNull(remoteDirectoryExpression); assertTrue(remoteDirectoryExpression instanceof LiteralExpression);