From 981b0d047f229f2c9fa6bc4187d2fadcd0080a5c Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sat, 3 Nov 2012 10:21:15 -0700 Subject: [PATCH] Remove commons-io dependency from jsch FilterInputStream suffices since we only override close and we can get away with using java.io.ByteArrayOutputStream. --- drivers/jsch/pom.xml | 5 ----- .../src/main/java/org/jclouds/ssh/jsch/JschSshClient.java | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/jsch/pom.xml b/drivers/jsch/pom.xml index 22077c523a..c311cdd654 100644 --- a/drivers/jsch/pom.xml +++ b/drivers/jsch/pom.xml @@ -88,11 +88,6 @@ jsch compile - - commons-io - commons-io - 2.4 - diff --git a/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/JschSshClient.java b/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/JschSshClient.java index 7d5418ef56..33fa43c8cc 100644 --- a/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/JschSshClient.java +++ b/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/JschSshClient.java @@ -30,7 +30,9 @@ import static org.jclouds.crypto.CryptoStreams.md5; import static org.jclouds.crypto.SshKeys.fingerprintPrivateKey; import static org.jclouds.crypto.SshKeys.sha1PrivateKey; +import java.io.ByteArrayOutputStream; import java.io.Closeable; +import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -40,8 +42,6 @@ import javax.annotation.PreDestroy; import javax.annotation.Resource; import javax.inject.Named; -import org.apache.commons.io.input.ProxyInputStream; -import org.apache.commons.io.output.ByteArrayOutputStream; import org.jclouds.compute.domain.ExecChannel; import org.jclouds.compute.domain.ExecResponse; import org.jclouds.domain.LoginCredentials; @@ -74,7 +74,7 @@ import com.jcraft.jsch.Session; */ public class JschSshClient implements SshClient { - private final class CloseFtpChannelOnCloseInputStream extends ProxyInputStream { + private final class CloseFtpChannelOnCloseInputStream extends FilterInputStream { private final ChannelSftp sftp;