mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 07:40:55 +03:00
Fixed more warnings
This commit is contained in:
@@ -62,8 +62,11 @@ public class IdentificationStringParser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void logHeaderLine(Buffer.PlainBuffer lineBuffer) {
|
private void logHeaderLine(Buffer.PlainBuffer lineBuffer) throws Buffer.BufferException {
|
||||||
|
byte[] bytes = new byte[lineBuffer.available()];
|
||||||
|
lineBuffer.readRawBytes(bytes);
|
||||||
|
String header = new String(bytes, 0, bytes.length - 1);
|
||||||
|
log.debug("Received header: {}", header);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String readIdentification(Buffer.PlainBuffer lineBuffer) throws Buffer.BufferException, TransportException {
|
private String readIdentification(Buffer.PlainBuffer lineBuffer) throws Buffer.BufferException, TransportException {
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ public class SecurityUtils {
|
|||||||
throw new SSHRuntimeException("Failed to register BouncyCastle as the defaut JCE provider");
|
throw new SSHRuntimeException("Failed to register BouncyCastle as the defaut JCE provider");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
registrationDone = true;
|
registrationDone = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -329,6 +329,8 @@ public abstract class AbstractChannel
|
|||||||
|
|
||||||
protected void gotUnknown(Message msg, SSHPacket buf)
|
protected void gotUnknown(Message msg, SSHPacket buf)
|
||||||
throws ConnectionException, TransportException {
|
throws ConnectionException, TransportException {
|
||||||
|
log.warn("Got unknown packet with type {}", msg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void handleRequest(String reqType, SSHPacket buf)
|
protected void handleRequest(String reqType, SSHPacket buf)
|
||||||
|
|||||||
@@ -24,10 +24,11 @@ import java.io.InputStream;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class PacketReader
|
public class PacketReader extends Thread {
|
||||||
extends Thread {
|
|
||||||
|
|
||||||
/** Logger */
|
/**
|
||||||
|
* Logger
|
||||||
|
*/
|
||||||
private final Logger log;
|
private final Logger log;
|
||||||
|
|
||||||
private final InputStream in;
|
private final InputStream in;
|
||||||
|
|||||||
@@ -46,10 +46,12 @@ public class NoneCipher
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(Mode mode, byte[] bytes, byte[] bytes1) {
|
public void init(Mode mode, byte[] bytes, byte[] bytes1) {
|
||||||
|
// Nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(byte[] input, int inputOffset, int inputLen) {
|
public void update(byte[] input, int inputOffset, int inputLen) {
|
||||||
|
// Nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,9 @@ public class BogusGSSContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() throws GSSException {}
|
public void dispose() throws GSSException {
|
||||||
|
// Nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getWrapSizeLimit(int qop, boolean confReq, int maxTokenSize) throws GSSException {
|
public int getWrapSizeLimit(int qop, boolean confReq, int maxTokenSize) throws GSSException {
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ public class BogusGSSCredential
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() throws GSSException {}
|
public void dispose() throws GSSException {
|
||||||
|
// Nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GSSName getName() throws GSSException {
|
public GSSName getName() throws GSSException {
|
||||||
|
|||||||
Reference in New Issue
Block a user