Fixed more warnings

This commit is contained in:
Jeroen van Erp
2017-01-23 14:40:33 +01:00
parent 8134113510
commit ef3f7a2eaf
8 changed files with 31 additions and 19 deletions

View File

@@ -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 {

View File

@@ -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;
} }
}
} }

View File

@@ -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)

View File

@@ -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;

View File

@@ -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
} }
} }

View File

@@ -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 {

View File

@@ -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 {