necessary and last before release polishing in FTP module

This commit is contained in:
Oleg Zhurakousky
2010-11-18 11:14:25 -05:00
parent 454eed23d1
commit cc6919f1dc
2 changed files with 4 additions and 4 deletions

View File

@@ -66,7 +66,10 @@ class FtpSendingMessageHandlerFactoryBean extends AbstractFactoryBean<FtpSending
QueuedFtpClientPool queuedFtpClientPool = new QueuedFtpClientPool(15, this.clientFactory);
FtpSendingMessageHandler ftpSendingMessageHandler = new FtpSendingMessageHandler(
queuedFtpClientPool);
ftpSendingMessageHandler.setFileNameGenerator(this.fileNameGenerator);
if (this.fileNameGenerator != null){
ftpSendingMessageHandler.setFileNameGenerator(this.fileNameGenerator);
}
if (this.charset != null) {
ftpSendingMessageHandler.setCharset(this.charset);
}

View File

@@ -93,9 +93,6 @@ public class FtpSendingMessageHandler extends AbstractMessageHandler{
}
private File handleFileMessage(File sourceFile, File tempFile, File resultFile) throws IOException {
if (sourceFile.renameTo(resultFile)) {
return resultFile;
}
FileCopyUtils.copy(sourceFile, tempFile);
tempFile.renameTo(resultFile);
return resultFile;