mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
Better argument order for IdentificationStringParser constructor.
This commit is contained in:
@@ -31,10 +31,10 @@ public class IdentificationStringParser {
|
|||||||
private byte[] EXPECTED_START_BYTES = new byte[] {'S', 'S', 'H', '-'};
|
private byte[] EXPECTED_START_BYTES = new byte[] {'S', 'S', 'H', '-'};
|
||||||
|
|
||||||
public IdentificationStringParser(Buffer.PlainBuffer buffer) {
|
public IdentificationStringParser(Buffer.PlainBuffer buffer) {
|
||||||
this(LoggerFactory.DEFAULT, buffer);
|
this(buffer, LoggerFactory.DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IdentificationStringParser(LoggerFactory loggerFactory, Buffer.PlainBuffer buffer) {
|
public IdentificationStringParser(Buffer.PlainBuffer buffer, LoggerFactory loggerFactory) {
|
||||||
this.log = loggerFactory.getLogger(IdentificationStringParser.class);
|
this.log = loggerFactory.getLogger(IdentificationStringParser.class);
|
||||||
this.buffer = buffer;
|
this.buffer = buffer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ public final class TransportImpl
|
|||||||
*/
|
*/
|
||||||
private String readIdentification(Buffer.PlainBuffer buffer)
|
private String readIdentification(Buffer.PlainBuffer buffer)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
String ident = new IdentificationStringParser(loggerFactory, buffer).parseIdentificationString();
|
String ident = new IdentificationStringParser(buffer, loggerFactory).parseIdentificationString();
|
||||||
if (ident.isEmpty()) {
|
if (ident.isEmpty()) {
|
||||||
return ident;
|
return ident;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user