mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 23:30:55 +03:00
More cleaning up
This commit is contained in:
@@ -19,7 +19,6 @@ import net.schmizz.sshj.transport.cipher.BaseCipher;
|
|||||||
|
|
||||||
import java.security.InvalidAlgorithmParameterException;
|
import java.security.InvalidAlgorithmParameterException;
|
||||||
import java.security.InvalidKeyException;
|
import java.security.InvalidKeyException;
|
||||||
import java.security.SecureRandom;
|
|
||||||
|
|
||||||
public class StreamCipher extends BaseCipher {
|
public class StreamCipher extends BaseCipher {
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import net.schmizz.sshj.connection.ConnectionException;
|
|||||||
import net.schmizz.sshj.connection.ConnectionImpl;
|
import net.schmizz.sshj.connection.ConnectionImpl;
|
||||||
import net.schmizz.sshj.transport.TransportException;
|
import net.schmizz.sshj.transport.TransportException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public abstract class KeepAlive extends Thread {
|
public abstract class KeepAlive extends Thread {
|
||||||
protected final Logger log;
|
protected final Logger log;
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package net.schmizz.sshj.common;
|
package net.schmizz.sshj.common;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import net.schmizz.sshj.connection.ConnectionException;
|
|||||||
import net.schmizz.sshj.transport.Transport;
|
import net.schmizz.sshj.transport.Transport;
|
||||||
import net.schmizz.sshj.transport.TransportException;
|
import net.schmizz.sshj.transport.TransportException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class PathHelper {
|
|||||||
if (path.equals(pathSep))
|
if (path.equals(pathSep))
|
||||||
return getComponents("", "");
|
return getComponents("", "");
|
||||||
|
|
||||||
if (path.isEmpty() || path.equals(".") || path.equals("." + pathSep))
|
if (path.isEmpty() || ".".equals(path) || ("." + pathSep).equals(path))
|
||||||
return getComponents(getDotDir());
|
return getComponents(getDotDir());
|
||||||
|
|
||||||
final String withoutTrailSep = trimTrailingSeparator(path);
|
final String withoutTrailSep = trimTrailingSeparator(path);
|
||||||
@@ -81,7 +81,7 @@ public class PathHelper {
|
|||||||
final String parent = (lastSep == -1) ? "" : withoutTrailSep.substring(0, lastSep);
|
final String parent = (lastSep == -1) ? "" : withoutTrailSep.substring(0, lastSep);
|
||||||
final String name = (lastSep == -1) ? withoutTrailSep : withoutTrailSep.substring(lastSep + pathSep.length());
|
final String name = (lastSep == -1) ? withoutTrailSep : withoutTrailSep.substring(lastSep + pathSep.length());
|
||||||
|
|
||||||
if (name.equals(".") || name.equals("..")) {
|
if (".".equals(name) || "..".equals(name)) {
|
||||||
return getComponents(canonicalizer.canonicalize(path));
|
return getComponents(canonicalizer.canonicalize(path));
|
||||||
} else {
|
} else {
|
||||||
return getComponents(parent, name);
|
return getComponents(parent, name);
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
package net.schmizz.sshj.sftp;
|
package net.schmizz.sshj.sftp;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|||||||
@@ -16,12 +16,10 @@
|
|||||||
package net.schmizz.sshj.transport;
|
package net.schmizz.sshj.transport;
|
||||||
|
|
||||||
import net.schmizz.sshj.common.*;
|
import net.schmizz.sshj.common.*;
|
||||||
import net.schmizz.sshj.transport.Transport;
|
|
||||||
import net.schmizz.sshj.transport.cipher.Cipher;
|
import net.schmizz.sshj.transport.cipher.Cipher;
|
||||||
import net.schmizz.sshj.transport.compression.Compression;
|
import net.schmizz.sshj.transport.compression.Compression;
|
||||||
import net.schmizz.sshj.transport.mac.MAC;
|
import net.schmizz.sshj.transport.mac.MAC;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/** Decodes packets from the SSH binary protocol per the current algorithms. */
|
/** Decodes packets from the SSH binary protocol per the current algorithms. */
|
||||||
final class Decoder
|
final class Decoder
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
package net.schmizz.sshj.transport;
|
package net.schmizz.sshj.transport;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
|
|||||||
Reference in New Issue
Block a user