You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/03/04 11:38:16 UTC
[1/2] camel git commit: CAMEL-9670 - Camel-ftp: No error message on
invalid credentials, thanks to Dirk Reske for the patch
Repository: camel
Updated Branches:
refs/heads/master 8bcbd5b03 -> 45475b357
CAMEL-9670 - Camel-ftp: No error message on invalid credentials, thanks to Dirk Reske for the patch
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4677897e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4677897e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4677897e
Branch: refs/heads/master
Commit: 4677897e82abed1ae0211ae873d95b6365edb50e
Parents: 8bcbd5b
Author: Andrea Cosentino <an...@gmail.com>
Authored: Fri Mar 4 11:33:52 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Fri Mar 4 11:33:52 2016 +0100
----------------------------------------------------------------------
.../org/apache/camel/component/file/remote/FtpOperations.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/4677897e/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
index 0528362..8621046 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
@@ -175,9 +175,13 @@ public class FtpOperations implements RemoteFileOperations<FTPFile> {
}
log.trace("User {} logged in: {}", username != null ? username : "anonymous", login);
if (!login) {
+ // store replyString, because disconnect() will reset ist
+ String replyString = client.getReplyString();
+ int replyCode = client.getReplyCode();
+
// disconnect to prevent connection leaks
client.disconnect();
- throw new GenericFileOperationFailedException(client.getReplyCode(), client.getReplyString());
+ throw new GenericFileOperationFailedException(replyCode, replyString);
}
client.setFileType(configuration.isBinary() ? FTP.BINARY_FILE_TYPE : FTP.ASCII_FILE_TYPE);
} catch (IOException e) {
[2/2] camel git commit: Fixed CS and adjusted comment in camel-ftp
FTPOperations
Posted by ac...@apache.org.
Fixed CS and adjusted comment in camel-ftp FTPOperations
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/45475b35
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/45475b35
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/45475b35
Branch: refs/heads/master
Commit: 45475b357c788f47cd4690439c77dff50ec9132d
Parents: 4677897
Author: Andrea Cosentino <an...@gmail.com>
Authored: Fri Mar 4 11:37:30 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Fri Mar 4 11:37:30 2016 +0100
----------------------------------------------------------------------
.../apache/camel/component/file/remote/FtpOperations.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/45475b35/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
index 8621046..cfc72f7 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
@@ -175,13 +175,12 @@ public class FtpOperations implements RemoteFileOperations<FTPFile> {
}
log.trace("User {} logged in: {}", username != null ? username : "anonymous", login);
if (!login) {
- // store replyString, because disconnect() will reset ist
- String replyString = client.getReplyString();
- int replyCode = client.getReplyCode();
-
+ // store replyString, because disconnect() will reset it
+ String replyString = client.getReplyString();
+ int replyCode = client.getReplyCode();
// disconnect to prevent connection leaks
client.disconnect();
- throw new GenericFileOperationFailedException(replyCode, replyString);
+ throw new GenericFileOperationFailedException(replyCode, replyString);
}
client.setFileType(configuration.isBinary() ? FTP.BINARY_FILE_TYPE : FTP.ASCII_FILE_TYPE);
} catch (IOException e) {