Skip to content

Commit

Permalink
Codacy styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hierynomus committed Aug 16, 2023
1 parent fc9bd49 commit bda8833
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
44 changes: 22 additions & 22 deletions src/test/java/com/hierynomus/smbj/testing/StubAuthenticator.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,33 @@
import com.hierynomus.spnego.RawToken;

public class StubAuthenticator implements Authenticator {
public static class Factory implements com.hierynomus.protocol.commons.Factory.Named<Authenticator> {
public static class Factory implements com.hierynomus.protocol.commons.Factory.Named<Authenticator> {

@Override
public String getName() {
return "stub";
}

@Override
public StubAuthenticator create() {
return new StubAuthenticator();
}
}

@Override
public String getName() {
return "stub";
public void init(SmbConfig config) {
}

@Override
public StubAuthenticator create() {
return new StubAuthenticator();
public boolean supports(AuthenticationContext context) {
return true;
}
}

@Override
public void init(SmbConfig config) {

}

@Override
public boolean supports(AuthenticationContext context) {
return true;
}

@Override
public AuthenticateResponse authenticate(AuthenticationContext context, byte[] gssToken, ConnectionContext connectionContext) throws IOException {
AuthenticateResponse resp = new AuthenticateResponse(new RawToken(new byte[0]));
resp.setSessionKey(ByteArrayUtils.parseHex("09921d4431b171b977370bf8910900f9"));
return resp;
}
@Override
public AuthenticateResponse authenticate(AuthenticationContext context, byte[] gssToken,
ConnectionContext connectionContext) throws IOException {
AuthenticateResponse resp = new AuthenticateResponse(new RawToken(new byte[0]));
resp.setSessionKey(ByteArrayUtils.parseHex("09921d4431b171b977370bf8910900f9"));
return resp;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static class StubTransportLayer<D extends PacketData<?>, P extends Packe
this.receiver = receiver;
if (this.receiver instanceof Connection) {
((Connection) this.receiver).setMessageConverter(new StubMessageConverter());
}
}

this.processPacket = processPacket;
}
Expand Down

0 comments on commit bda8833

Please sign in to comment.