Better argument order for IdentificationStringParser constructor.

This commit is contained in:
David Solin
2016-08-29 15:19:06 -05:00
parent 7b8b1cfdf5
commit 9425300262
2 changed files with 3 additions and 3 deletions

View File

@@ -31,10 +31,10 @@ public class IdentificationStringParser {
private byte[] EXPECTED_START_BYTES = new byte[] {'S', 'S', 'H', '-'};
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.buffer = buffer;
}

View File

@@ -219,7 +219,7 @@ public final class TransportImpl
*/
private String readIdentification(Buffer.PlainBuffer buffer)
throws IOException {
String ident = new IdentificationStringParser(loggerFactory, buffer).parseIdentificationString();
String ident = new IdentificationStringParser(buffer, loggerFactory).parseIdentificationString();
if (ident.isEmpty()) {
return ident;
}