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 2014/08/19 08:30:28 UTC
git commit: CAMEL-7717: camel-jsch - Should throw
UnsupportedOperationException when creating a consumer instead of causing a
NPE
Repository: camel
Updated Branches:
refs/heads/master c112e8f23 -> 40b4e80d5
CAMEL-7717: camel-jsch - Should throw UnsupportedOperationException when creating a consumer instead of causing a NPE
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/40b4e80d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/40b4e80d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/40b4e80d
Branch: refs/heads/master
Commit: 40b4e80d524f19d45876e3bf92ff4e90a9db6ba9
Parents: c112e8f
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Aug 19 08:30:20 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Aug 19 08:30:20 2014 +0200
----------------------------------------------------------------------
.../main/java/org/apache/camel/component/jsch/ScpEndpoint.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/40b4e80d/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpEndpoint.java b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpEndpoint.java
index 5030dfc..4131f73 100644
--- a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpEndpoint.java
+++ b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpEndpoint.java
@@ -43,13 +43,15 @@ public class ScpEndpoint extends RemoteFileEndpoint<ScpFile> {
@Override
protected RemoteFileConsumer<ScpFile> buildConsumer(Processor processor) {
- return null; // new ScpConsumer(this, processor, createRemoteFileOperations());
+ throw new UnsupportedOperationException("This component does not support consuming from this endpoint");
}
+ @Override
protected GenericFileProducer<ScpFile> buildProducer() {
return new ScpProducer(this, createRemoteFileOperations());
}
+ @Override
public RemoteFileOperations<ScpFile> createRemoteFileOperations() {
ScpOperations operations = new ScpOperations();
operations.setEndpoint(this);