INT-1614 removing dependencies on commons-lang
This commit is contained in:
@@ -207,8 +207,6 @@ project('spring-integration-ftp') {
|
||||
description = 'Spring Integration FTP Support'
|
||||
dependencies {
|
||||
compile project(":spring-integration-file")
|
||||
compile "commons-io:commons-io:$commonsIoVersion"
|
||||
compile "commons-lang:commons-lang:$commonsLangVersion"
|
||||
compile "commons-net:commons-net:$commonsNetVersion"
|
||||
compile "org.springframework:spring-context-support:$springVersion"
|
||||
compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
|
||||
@@ -339,8 +337,6 @@ project('spring-integration-sftp') {
|
||||
compile project(":spring-integration-file")
|
||||
compile project(":spring-integration-stream")
|
||||
compile "com.jcraft:jsch:0.1.42"
|
||||
compile "commons-io:commons-io:$commonsIoVersion"
|
||||
compile "commons-lang:commons-lang:$commonsLangVersion"
|
||||
compile "org.springframework:spring-context-support:$springVersion"
|
||||
compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
|
||||
testCompile project(":spring-integration-test")
|
||||
|
||||
@@ -20,12 +20,12 @@ import java.io.InputStream;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.integration.file.remote.session.Session;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.jcraft.jsch.ChannelSftp;
|
||||
import com.jcraft.jsch.JSch;
|
||||
@@ -88,15 +88,15 @@ public class SftpSession implements Session {
|
||||
}
|
||||
this.privateKey = privateKey;
|
||||
this.privateKeyPassphrase = pvKeyPassPhrase;
|
||||
if (!StringUtils.isEmpty(knownHostsFile)) {
|
||||
if (StringUtils.hasText(knownHostsFile)) {
|
||||
jSch.setKnownHosts(knownHostsFile);
|
||||
}
|
||||
else if (null != knownHostsInputStream) {
|
||||
else if (knownHostsInputStream != null) {
|
||||
jSch.setKnownHosts(knownHostsInputStream);
|
||||
}
|
||||
// private key
|
||||
if (privateKey != null) {
|
||||
if (!StringUtils.isEmpty(privateKeyPassphrase)) {
|
||||
if (StringUtils.hasText(privateKeyPassphrase)) {
|
||||
jSch.addIdentity(this.privateKey, privateKeyPassphrase);
|
||||
}
|
||||
else {
|
||||
@@ -104,7 +104,7 @@ public class SftpSession implements Session {
|
||||
}
|
||||
}
|
||||
this.jschSession = jSch.getSession(userName, hostName, port);
|
||||
if (!StringUtils.isEmpty(userPassword)) {
|
||||
if (StringUtils.hasText(userPassword)) {
|
||||
this.jschSession.setPassword(userPassword);
|
||||
}
|
||||
this.userInfo = new OptimisticUserInfoImpl(userPassword);
|
||||
|
||||
Reference in New Issue
Block a user