servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r796252 - in /servicemix/components/bindings/servicemix-file/trunk/src: main/java/org/apache/servicemix/file/FileSenderEndpoint.java test/java/org/apache/servicemix/file/FilePollerEndpointTest.java test/resources/spring-polling.xml
Date Tue, 21 Jul 2009 11:16:52 GMT
Author: lhein
Date: Tue Jul 21 11:16:51 2009
New Revision: 796252

URL: http://svn.apache.org/viewvc?rev=796252&view=rev
Log:
fixed problem that files are deleted accidently if overwrite is disabled in file sender endpoint
(see SMXCOMP-595)

Modified:
    servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
    servicemix/components/bindings/servicemix-file/trunk/src/test/java/org/apache/servicemix/file/FilePollerEndpointTest.java
    servicemix/components/bindings/servicemix-file/trunk/src/test/resources/spring-polling.xml

Modified: servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java?rev=796252&r1=796251&r2=796252&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
(original)
+++ servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
Tue Jul 21 11:16:51 2009
@@ -98,6 +98,7 @@
                 		// all fine, we append
                 	} else {
                 		// no overwrite and no append
+                		newFile = null;
                 		throw new IOException("Can not write " + name
                                 + " : file already exists and overwrite has not been enabled");
                 	}

Modified: servicemix/components/bindings/servicemix-file/trunk/src/test/java/org/apache/servicemix/file/FilePollerEndpointTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-file/trunk/src/test/java/org/apache/servicemix/file/FilePollerEndpointTest.java?rev=796252&r1=796251&r2=796252&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-file/trunk/src/test/java/org/apache/servicemix/file/FilePollerEndpointTest.java
(original)
+++ servicemix/components/bindings/servicemix-file/trunk/src/test/java/org/apache/servicemix/file/FilePollerEndpointTest.java
Tue Jul 21 11:16:51 2009
@@ -26,7 +26,6 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Semaphore;
 
 import javax.jbi.management.DeploymentException;
 import javax.jbi.messaging.ExchangeStatus;
@@ -40,7 +39,6 @@
 
 import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.executors.Executor;
-import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.tck.mock.MockExchangeFactory;
 import org.apache.servicemix.tck.mock.MockMessageExchange;
 import org.apache.servicemix.util.FileUtil;

Modified: servicemix/components/bindings/servicemix-file/trunk/src/test/resources/spring-polling.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-file/trunk/src/test/resources/spring-polling.xml?rev=796252&r1=796251&r2=796252&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-file/trunk/src/test/resources/spring-polling.xml
(original)
+++ servicemix/components/bindings/servicemix-file/trunk/src/test/resources/spring-polling.xml
Tue Jul 21 11:16:51 2009
@@ -75,6 +75,7 @@
                            endpoint="endpoint"
                            directory="file:target/pollerFilesNotAppend"
                            append="false"
+                           overwrite="true"
                            autoCreateDirectory="true"/>
               
               <file:sender service="test:serviceAppend"



Mime
View raw message