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:
Gary D. Gregory 2013-01-13 04:49:33 +00:00
parent 323adda52e
commit 3a073e8ed8
13 changed files with 16 additions and 16 deletions

View File

@ -45,7 +45,7 @@ class WarningValue {
private int offs;
private int init_offs;
private String src;
private final String src;
private int warnCode;
private String warnAgent;
private String warnText;

View File

@ -35,8 +35,8 @@ package org.apache.http.impl.client.cache.memcached;
*/
public class PrefixKeyHashingScheme implements KeyHashingScheme {
private String prefix;
private KeyHashingScheme backingScheme;
private final String prefix;
private final KeyHashingScheme backingScheme;
/**
* Creates a new {@link KeyHashingScheme} that prepends the given

View File

@ -32,7 +32,7 @@ import java.io.InputStream;
public class ConsumableInputStream extends InputStream {
private ByteArrayInputStream buf;
private final ByteArrayInputStream buf;
private boolean closed = false;
public ConsumableInputStream(ByteArrayInputStream buf) {

View File

@ -31,7 +31,7 @@ import org.easymock.IArgumentMatcher;
public class RequestEquivalent implements IArgumentMatcher {
private HttpRequest expected;
private final HttpRequest expected;
public RequestEquivalent(HttpRequest expected) {
this.expected = expected;

View File

@ -75,7 +75,7 @@ public class TestProtocolDeviations {
private static final int MAX_BYTES = 1024;
private static final int MAX_ENTRIES = 100;
private int entityLength = 128;
private final int entityLength = 128;
private HttpHost host;
private HttpRoute route;

View File

@ -49,7 +49,7 @@ public class TestResponseCachingPolicy {
private ResponseCachingPolicy policy;
private HttpResponse response;
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_MOVED_PERMANENTLY, HttpStatus.SC_GONE };
private Date now;

View File

@ -198,7 +198,7 @@ public class DefaultRequestDirector implements RequestDirector {
private int redirectCount;
private int maxRedirects;
private final int maxRedirects;
private HttpHost virtualHost;

View File

@ -51,7 +51,7 @@ public class InMemoryDnsResolver implements DnsResolver {
* In-memory collection that will hold the associations between a host name
* 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

View File

@ -38,7 +38,7 @@ import org.junit.Test;
*/
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
public void testRewrite() throws Exception {

View File

@ -325,8 +325,8 @@ public class TestAbortHandling extends IntegrationTestBase {
}
private static class BasicRedirectService implements HttpRequestHandler {
private int statuscode = HttpStatus.SC_SEE_OTHER;
private int port;
private final int statuscode = HttpStatus.SC_SEE_OTHER;
private final int port;
public BasicRedirectService(int port) {
this.port = port;

View File

@ -331,7 +331,7 @@ public class TestClientAuthentication extends IntegrationTestBase {
static class TestTargetAuthenticationStrategy extends TargetAuthenticationStrategy {
private AtomicLong count;
private final AtomicLong count;
public TestTargetAuthenticationStrategy() {
super();
@ -424,7 +424,7 @@ public class TestClientAuthentication extends IntegrationTestBase {
static class CountingAuthHandler implements HttpRequestHandler {
private AtomicLong count;
private final AtomicLong count;
public CountingAuthHandler() {
super();

View File

@ -99,7 +99,7 @@ public class TestClientReauthentication extends IntegrationTestBase {
static class AuthHandler implements HttpRequestHandler {
private AtomicLong count = new AtomicLong(0);
private final AtomicLong count = new AtomicLong(0);
public void handle(
final HttpRequest request,

View File

@ -186,7 +186,7 @@ public class TestRedirects extends IntegrationTestBase {
}
private static class BogusRedirectService implements HttpRequestHandler {
private String url;
private final String url;
public BogusRedirectService(String redirectUrl) {
super();