fix toBean

This commit is contained in:
Looly
2019-10-17 17:37:20 +08:00
parent ff65a8cc0c
commit 61ba892b49
17 changed files with 190 additions and 210 deletions

View File

@@ -157,7 +157,7 @@ public class JschUtil {
*/
public static Session createSession(String sshHost, int sshPort, String sshUser, String privateKeyPath, byte[] passphrase) {
Assert.notEmpty(sshHost, "SSH Host must be not empty!");
Assert.isTrue(sshPort < 0, "SSH Host must be not empty!");
Assert.isTrue(sshPort > 0, "SSH port must be > 0");
Assert.notEmpty(privateKeyPath, "PrivateKey Path must be not empty!");
// 默认root用户