Minor Improvements:

* Remove redundant initialization
This commit is contained in:
Arturo Bernal 2021-01-04 21:16:34 +01:00 committed by Oleg Kalnichevski
parent 8285223560
commit 6a02e818ff
11 changed files with 34 additions and 34 deletions

View File

@ -35,7 +35,7 @@ import org.apache.hc.core5.io.Closer;
public class ConsumableInputStream extends InputStream {
private final ByteArrayInputStream buf;
private boolean closed = false;
private boolean closed;
public ConsumableInputStream(final ByteArrayInputStream buf) {
this.buf = buf;

View File

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

View File

@ -1207,7 +1207,7 @@ public abstract class TestCachingExecChain {
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 {

View File

@ -397,7 +397,7 @@ public class TestContentCodings extends LocalServerTestBase {
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) {

View File

@ -79,7 +79,7 @@ public class TestSSLSocketFactory {
static class TestX509HostnameVerifier implements HostnameVerifier {
private boolean fired = false;
private boolean fired;
@Override
public boolean verify(final String host, final SSLSession session) {

View File

@ -138,7 +138,7 @@ public class DeflateInputStream extends InputStream {
static class DeflateStream extends InflaterInputStream {
private boolean closed = false;
private boolean closed;
public DeflateStream(final InputStream in, final Inflater inflater) {
super(in, inflater);

View File

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

View File

@ -332,22 +332,22 @@ final class NTLMEngineImpl implements NTLMEngine {
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 @@ final class NTLMEngineImpl implements NTLMEngine {
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 @@ final class NTLMEngineImpl implements NTLMEngine {
/** 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 @@ final class NTLMEngineImpl implements NTLMEngine {
int B = 0xefcdab89;
int C = 0x98badcfe;
int D = 0x10325476;
long count = 0L;
long count;
final byte[] dataBuffer = new byte[64];
MD4() {

View File

@ -51,7 +51,7 @@ class RequestEntityProxy implements HttpEntity {
}
private final HttpEntity original;
private boolean consumed = false;
private boolean consumed;
RequestEntityProxy(final HttpEntity original) {
super();

View File

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

View File

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