You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/10/31 11:52:44 UTC

[camel] branch master updated: Polished

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 536ae39  Polished
536ae39 is described below

commit 536ae39085b44816c6c7e747fd063f76b836d2ba
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Oct 31 12:52:31 2017 +0100

    Polished
---
 .../apache/camel/component/file/remote/SftpConsumer.java | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConsumer.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConsumer.java
index 048c5ac..1b3262f 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConsumer.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConsumer.java
@@ -27,6 +27,7 @@ import org.apache.camel.component.file.GenericFile;
 import org.apache.camel.component.file.GenericFileOperationFailedException;
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.URISupport;
 
 /**
  * Secure FTP consumer
@@ -35,6 +36,8 @@ public class SftpConsumer extends RemoteFileConsumer<ChannelSftp.LsEntry> {
 
     private String endpointPath;
 
+    private transient String sftpConsumerToString;
+
     public SftpConsumer(RemoteFileEndpoint<ChannelSftp.LsEntry> endpoint, Processor processor, RemoteFileOperations<ChannelSftp.LsEntry> operations) {
         super(endpoint, processor, operations);
         this.endpointPath = endpoint.getConfiguration().getDirectory();
@@ -243,4 +246,17 @@ public class SftpConsumer extends RemoteFileConsumer<ChannelSftp.LsEntry> {
         return config.isStepwise();
     }
 
+    private boolean isUseList() {
+        RemoteFileConfiguration config = (RemoteFileConfiguration) endpoint.getConfiguration();
+        return config.isUseList();
+    }
+
+    @Override
+    public String toString() {
+        if (sftpConsumerToString == null) {
+            sftpConsumerToString = "SftpConsumer[" + URISupport.sanitizeUri(getEndpoint().getEndpointUri()) + "]";
+        }
+        return sftpConsumerToString;
+    }
+
 }

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].