You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2010/04/27 05:18:18 UTC

svn commit: r938309 - in /camel/trunk/components/camel-ftp/src: main/java/org/apache/camel/component/file/remote/ test/java/org/apache/camel/component/file/remote/

Author: ningjiang
Date: Tue Apr 27 03:18:18 2010
New Revision: 938309

URL: http://svn.apache.org/viewvc?rev=938309&view=rev
Log:
Clean up the @SuppressWarnings in camel-ftp

Modified:
    camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
    camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java
    camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDoNotDeleteFileIfProcessFailsTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RecipientListErrorHandlingIssueTest.java

Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java?rev=938309&r1=938308&r2=938309&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java Tue Apr 27 03:18:18 2010
@@ -44,7 +44,6 @@ public abstract class RemoteFileEndpoint
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public Exchange createExchange(GenericFile<T> file) {
         Exchange answer = new DefaultExchange(this);
         if (file != null) {

Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java?rev=938309&r1=938308&r2=938309&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java Tue Apr 27 03:18:18 2010
@@ -44,7 +44,6 @@ public class RemoteFileProducer<T> exten
         return name;
     }
 
-    @SuppressWarnings("unchecked")
     public void process(Exchange exchange) throws Exception {
         Exchange remoteExchange = getEndpoint().createExchange(exchange);
         processExchange(remoteExchange);

Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java?rev=938309&r1=938308&r2=938309&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java Tue Apr 27 03:18:18 2010
@@ -325,6 +325,7 @@ public class SftpOperations implements R
         }
     }
 
+    @SuppressWarnings("unchecked")
     private boolean retrieveFileToStreamInBody(String name, Exchange exchange) throws GenericFileOperationFailedException {
         OutputStream os = null;
         try {
@@ -342,6 +343,7 @@ public class SftpOperations implements R
         }
     }
 
+    @SuppressWarnings("unchecked")
     private boolean retrieveFileToFileInLocalWorkDirectory(String name, Exchange exchange) throws GenericFileOperationFailedException {
         File temp;
         File local = new File(endpoint.getLocalWorkDirectory());

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDoNotDeleteFileIfProcessFailsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDoNotDeleteFileIfProcessFailsTest.java?rev=938309&r1=938308&r2=938309&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDoNotDeleteFileIfProcessFailsTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDoNotDeleteFileIfProcessFailsTest.java Tue Apr 27 03:18:18 2010
@@ -82,7 +82,7 @@ public class FromFtpDoNotDeleteFileIfPro
         return new RouteBuilder() {
             public void configure() throws Exception {
                 // use no delay for fast unit testing
-                errorHandler(deadLetterChannel("mock:error").maximumRedeliveries(2).redeliverDelay(0).handled(false));
+                errorHandler(deadLetterChannel("mock:error").maximumRedeliveries(2).redeliveryDelay(0).handled(false));
 
                 from(getFtpUrl()).process(new Processor() {
                     public void process(Exchange exchange) throws Exception {

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RecipientListErrorHandlingIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RecipientListErrorHandlingIssueTest.java?rev=938309&r1=938308&r2=938309&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RecipientListErrorHandlingIssueTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RecipientListErrorHandlingIssueTest.java Tue Apr 27 03:18:18 2010
@@ -18,6 +18,7 @@ package org.apache.camel.component.file.
 
 import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.Future;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
@@ -67,7 +68,7 @@ public class RecipientListErrorHandlingI
 
         String foo = "direct:foo," + getFtpUrl();
 
-        Map headers = new HashMap();
+        Map<String, Object> headers = new HashMap<String, Object>();
         headers.put("foo", foo);
         headers.put(Exchange.FILE_NAME, "hello.txt");
 
@@ -97,7 +98,7 @@ public class RecipientListErrorHandlingI
 
         String foo = "direct:foo," + getFtpUrl();
 
-        Map headers = new HashMap();
+        Map<String, Object> headers = new HashMap<String, Object>();
         headers.put("foo", foo);
         headers.put(Exchange.FILE_NAME, "hello.txt");