Skip to content
Permalink
Browse files
Minor Improvements:
* Remove redundant initialization
  • Loading branch information
arturobernalg authored and ok2c committed Jan 5, 2021
1 parent 8285223 commit 6a02e818fff4c71ea11945e45f6e42aeb1e12a33
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 34 deletions.
@@ -35,7 +35,7 @@
public class ConsumableInputStream extends InputStream {

private final ByteArrayInputStream buf;
private boolean closed = false;
private boolean closed;

public ConsumableInputStream(final ByteArrayInputStream buf) {
this.buf = buf;
@@ -40,7 +40,7 @@ public class DummyBackend implements ExecChain {

private ClassicHttpRequest request;
private ClassicHttpResponse response = new BasicClassicHttpResponse(HttpStatus.SC_OK, "OK");
private int executions = 0;
private int executions;

public void setResponse(final ClassicHttpResponse resp) {
response = resp;
@@ -1207,7 +1207,7 @@ public void testSocketTimeoutExceptionIsNotSilentlyCatched() throws Exception {
final ClassicHttpResponse resp1 = new BasicClassicHttpResponse(HttpStatus.SC_OK,
"OK");
resp1.setEntity(new InputStreamEntity(new InputStream() {
private boolean closed = false;
private boolean closed;

@Override
public void close() throws IOException {
@@ -397,7 +397,7 @@ class WorkerTask implements Runnable {
private final CountDownLatch startGate;
private final CountDownLatch endGate;

private boolean failed = false;
private boolean failed;
private String text;

WorkerTask(final CloseableHttpClient client, final HttpHost target, final boolean identity, final CountDownLatch startGate, final CountDownLatch endGate) {
@@ -79,7 +79,7 @@ public void shutDown() throws Exception {

static class TestX509HostnameVerifier implements HostnameVerifier {

private boolean fired = false;
private boolean fired;

@Override
public boolean verify(final String host, final SSLSession session) {
@@ -138,7 +138,7 @@ public void close() throws IOException {

static class DeflateStream extends InflaterInputStream {

private boolean closed = false;
private boolean closed;

public DeflateStream(final InputStream in, final Inflater inflater) {
super(in, inflater);
@@ -59,9 +59,9 @@ public class MultipartEntityBuilder {

private ContentType contentType;
private HttpMultipartMode mode = HttpMultipartMode.STRICT;
private String boundary = null;
private Charset charset = null;
private List<MultipartPart> multipartParts = null;
private String boundary;
private Charset charset;
private List<MultipartPart> multipartParts;

public static MultipartEntityBuilder create() {
return new MultipartEntityBuilder();
@@ -332,22 +332,22 @@ static class CipherGen {
byte[] timestamp;

// Stuff we always generate
byte[] lmHash = null;
byte[] lmResponse = null;
byte[] ntlmHash = null;
byte[] ntlmResponse = null;
byte[] ntlmv2Hash = null;
byte[] lmv2Hash = null;
byte[] lmv2Response = null;
byte[] ntlmv2Blob = null;
byte[] ntlmv2Response = null;
byte[] ntlm2SessionResponse = null;
byte[] lm2SessionResponse = null;
byte[] lmUserSessionKey = null;
byte[] ntlmUserSessionKey = null;
byte[] ntlmv2UserSessionKey = null;
byte[] ntlm2SessionResponseUserSessionKey = null;
byte[] lanManagerSessionKey = null;
byte[] lmHash;
byte[] lmResponse;
byte[] ntlmHash;
byte[] ntlmResponse;
byte[] ntlmv2Hash;
byte[] lmv2Hash;
byte[] lmv2Response;
byte[] ntlmv2Blob;
byte[] ntlmv2Response;
byte[] ntlm2SessionResponse;
byte[] lm2SessionResponse;
byte[] lmUserSessionKey;
byte[] ntlmUserSessionKey;
byte[] ntlmv2UserSessionKey;
byte[] ntlm2SessionResponseUserSessionKey;
byte[] lanManagerSessionKey;

public CipherGen(final Random random, final long currentTime,
final String domain, final String user, final char[] password,
@@ -808,7 +808,7 @@ private static byte[] lmv2Response(final byte[] hash, final byte[] challenge, fi
private final Cipher rc4;
final Mode mode;
final private boolean isConnection;
int sequenceNumber = 0;
int sequenceNumber;


Handle( final byte[] exportedSessionKey, final Mode mode, final boolean isConnection ) throws NTLMEngineException
@@ -1080,10 +1080,10 @@ private static Charset getCharset(final int flags) throws NTLMEngineException
/** NTLM message generation, base class */
static class NTLMMessage {
/** The current response */
byte[] messageContents = null;
byte[] messageContents;

/** The current output position */
int currentOutputPosition = 0;
int currentOutputPosition;

/** Constructor to use when message contents are not yet known */
NTLMMessage() {
@@ -1862,7 +1862,7 @@ static class MD4 {
int B = 0xefcdab89;
int C = 0x98badcfe;
int D = 0x10325476;
long count = 0L;
long count;
final byte[] dataBuffer = new byte[64];

MD4() {
@@ -51,7 +51,7 @@ static boolean isEnhanced(final HttpEntity entity) {
}

private final HttpEntity original;
private boolean consumed = false;
private boolean consumed;

RequestEntityProxy(final HttpEntity original) {
super();
@@ -80,8 +80,8 @@ public class PoolingHttpClientConnectionManagerBuilder {

private boolean systemProperties;

private int maxConnTotal = 0;
private int maxConnPerRoute = 0;
private int maxConnTotal;
private int maxConnPerRoute;

private TimeValue timeToLive;
private TimeValue validateAfterInactivity;
@@ -74,8 +74,8 @@ public class PoolingAsyncClientConnectionManagerBuilder {

private boolean systemProperties;

private int maxConnTotal = 0;
private int maxConnPerRoute = 0;
private int maxConnTotal;
private int maxConnPerRoute;

private TimeValue timeToLive;
private TimeValue validateAfterInactivity;

0 comments on commit 6a02e81

Please sign in to comment.