Add final modifier to private fields.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1432552 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
323adda52e
commit
3a073e8ed8
|
@ -45,7 +45,7 @@ class WarningValue {
|
||||||
|
|
||||||
private int offs;
|
private int offs;
|
||||||
private int init_offs;
|
private int init_offs;
|
||||||
private String src;
|
private final String src;
|
||||||
private int warnCode;
|
private int warnCode;
|
||||||
private String warnAgent;
|
private String warnAgent;
|
||||||
private String warnText;
|
private String warnText;
|
||||||
|
|
|
@ -35,8 +35,8 @@ package org.apache.http.impl.client.cache.memcached;
|
||||||
*/
|
*/
|
||||||
public class PrefixKeyHashingScheme implements KeyHashingScheme {
|
public class PrefixKeyHashingScheme implements KeyHashingScheme {
|
||||||
|
|
||||||
private String prefix;
|
private final String prefix;
|
||||||
private KeyHashingScheme backingScheme;
|
private final KeyHashingScheme backingScheme;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new {@link KeyHashingScheme} that prepends the given
|
* Creates a new {@link KeyHashingScheme} that prepends the given
|
||||||
|
|
|
@ -32,7 +32,7 @@ import java.io.InputStream;
|
||||||
|
|
||||||
public class ConsumableInputStream extends InputStream {
|
public class ConsumableInputStream extends InputStream {
|
||||||
|
|
||||||
private ByteArrayInputStream buf;
|
private final ByteArrayInputStream buf;
|
||||||
private boolean closed = false;
|
private boolean closed = false;
|
||||||
|
|
||||||
public ConsumableInputStream(ByteArrayInputStream buf) {
|
public ConsumableInputStream(ByteArrayInputStream buf) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ import org.easymock.IArgumentMatcher;
|
||||||
|
|
||||||
public class RequestEquivalent implements IArgumentMatcher {
|
public class RequestEquivalent implements IArgumentMatcher {
|
||||||
|
|
||||||
private HttpRequest expected;
|
private final HttpRequest expected;
|
||||||
|
|
||||||
public RequestEquivalent(HttpRequest expected) {
|
public RequestEquivalent(HttpRequest expected) {
|
||||||
this.expected = expected;
|
this.expected = expected;
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class TestProtocolDeviations {
|
||||||
|
|
||||||
private static final int MAX_BYTES = 1024;
|
private static final int MAX_BYTES = 1024;
|
||||||
private static final int MAX_ENTRIES = 100;
|
private static final int MAX_ENTRIES = 100;
|
||||||
private int entityLength = 128;
|
private final int entityLength = 128;
|
||||||
|
|
||||||
private HttpHost host;
|
private HttpHost host;
|
||||||
private HttpRoute route;
|
private HttpRoute route;
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class TestResponseCachingPolicy {
|
||||||
private ResponseCachingPolicy policy;
|
private ResponseCachingPolicy policy;
|
||||||
private HttpResponse response;
|
private HttpResponse response;
|
||||||
private HttpRequest request;
|
private HttpRequest request;
|
||||||
private int[] acceptableCodes = new int[] { HttpStatus.SC_OK,
|
private final int[] acceptableCodes = new int[] { HttpStatus.SC_OK,
|
||||||
HttpStatus.SC_NON_AUTHORITATIVE_INFORMATION, HttpStatus.SC_MULTIPLE_CHOICES,
|
HttpStatus.SC_NON_AUTHORITATIVE_INFORMATION, HttpStatus.SC_MULTIPLE_CHOICES,
|
||||||
HttpStatus.SC_MOVED_PERMANENTLY, HttpStatus.SC_GONE };
|
HttpStatus.SC_MOVED_PERMANENTLY, HttpStatus.SC_GONE };
|
||||||
private Date now;
|
private Date now;
|
||||||
|
|
|
@ -198,7 +198,7 @@ public class DefaultRequestDirector implements RequestDirector {
|
||||||
|
|
||||||
private int redirectCount;
|
private int redirectCount;
|
||||||
|
|
||||||
private int maxRedirects;
|
private final int maxRedirects;
|
||||||
|
|
||||||
private HttpHost virtualHost;
|
private HttpHost virtualHost;
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class InMemoryDnsResolver implements DnsResolver {
|
||||||
* In-memory collection that will hold the associations between a host name
|
* In-memory collection that will hold the associations between a host name
|
||||||
* and an array of InetAddress instances.
|
* and an array of InetAddress instances.
|
||||||
*/
|
*/
|
||||||
private Map<String, InetAddress[]> dnsMap;
|
private final Map<String, InetAddress[]> dnsMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a DNS resolver that will resolve the host names against a
|
* Builds a DNS resolver that will resolve the host names against a
|
||||||
|
|
|
@ -38,7 +38,7 @@ import org.junit.Test;
|
||||||
*/
|
*/
|
||||||
public class TestURIUtils {
|
public class TestURIUtils {
|
||||||
|
|
||||||
private URI baseURI = URI.create("http://a/b/c/d;p?q");
|
private final URI baseURI = URI.create("http://a/b/c/d;p?q");
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRewrite() throws Exception {
|
public void testRewrite() throws Exception {
|
||||||
|
|
|
@ -325,8 +325,8 @@ public class TestAbortHandling extends IntegrationTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class BasicRedirectService implements HttpRequestHandler {
|
private static class BasicRedirectService implements HttpRequestHandler {
|
||||||
private int statuscode = HttpStatus.SC_SEE_OTHER;
|
private final int statuscode = HttpStatus.SC_SEE_OTHER;
|
||||||
private int port;
|
private final int port;
|
||||||
|
|
||||||
public BasicRedirectService(int port) {
|
public BasicRedirectService(int port) {
|
||||||
this.port = port;
|
this.port = port;
|
||||||
|
|
|
@ -331,7 +331,7 @@ public class TestClientAuthentication extends IntegrationTestBase {
|
||||||
|
|
||||||
static class TestTargetAuthenticationStrategy extends TargetAuthenticationStrategy {
|
static class TestTargetAuthenticationStrategy extends TargetAuthenticationStrategy {
|
||||||
|
|
||||||
private AtomicLong count;
|
private final AtomicLong count;
|
||||||
|
|
||||||
public TestTargetAuthenticationStrategy() {
|
public TestTargetAuthenticationStrategy() {
|
||||||
super();
|
super();
|
||||||
|
@ -424,7 +424,7 @@ public class TestClientAuthentication extends IntegrationTestBase {
|
||||||
|
|
||||||
static class CountingAuthHandler implements HttpRequestHandler {
|
static class CountingAuthHandler implements HttpRequestHandler {
|
||||||
|
|
||||||
private AtomicLong count;
|
private final AtomicLong count;
|
||||||
|
|
||||||
public CountingAuthHandler() {
|
public CountingAuthHandler() {
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class TestClientReauthentication extends IntegrationTestBase {
|
||||||
|
|
||||||
static class AuthHandler implements HttpRequestHandler {
|
static class AuthHandler implements HttpRequestHandler {
|
||||||
|
|
||||||
private AtomicLong count = new AtomicLong(0);
|
private final AtomicLong count = new AtomicLong(0);
|
||||||
|
|
||||||
public void handle(
|
public void handle(
|
||||||
final HttpRequest request,
|
final HttpRequest request,
|
||||||
|
|
|
@ -186,7 +186,7 @@ public class TestRedirects extends IntegrationTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class BogusRedirectService implements HttpRequestHandler {
|
private static class BogusRedirectService implements HttpRequestHandler {
|
||||||
private String url;
|
private final String url;
|
||||||
|
|
||||||
public BogusRedirectService(String redirectUrl) {
|
public BogusRedirectService(String redirectUrl) {
|
||||||
super();
|
super();
|
||||||
|
|
Loading…
Reference in New Issue