Skip to content

Commit

Permalink
Add final modifier to private fields.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1432552 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
garydgregory committed Jan 13, 2013
1 parent 323adda commit 3a073e8
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
*/
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

public class ConsumableInputStream extends InputStream {

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

public ConsumableInputStream(ByteArrayInputStream buf) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

public class RequestEquivalent implements IArgumentMatcher {

private HttpRequest expected;
private final HttpRequest expected;

public RequestEquivalent(HttpRequest expected) {
this.expected = expected;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public class DefaultRequestDirector implements RequestDirector {

private int redirectCount;

private int maxRedirects;
private final int maxRedirects;

private HttpHost virtualHost;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*/
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ public void handle(final HttpRequest request,
}

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public void testBasicAuthenticationFailureOnNonRepeatablePost() throws Exception

static class TestTargetAuthenticationStrategy extends TargetAuthenticationStrategy {

private AtomicLong count;
private final AtomicLong count;

public TestTargetAuthenticationStrategy() {
super();
Expand Down Expand Up @@ -424,7 +424,7 @@ public void testAuthenticationUserinfoInRequestFailure() throws Exception {

static class CountingAuthHandler implements HttpRequestHandler {

private AtomicLong count;
private final AtomicLong count;

public CountingAuthHandler() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void setUp() throws Exception {

static class AuthHandler implements HttpRequestHandler {

private AtomicLong count = new AtomicLong(0);
private final AtomicLong count = new AtomicLong(0);

public void handle(
final HttpRequest request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void handle(
}

private static class BogusRedirectService implements HttpRequestHandler {
private String url;
private final String url;

public BogusRedirectService(String redirectUrl) {
super();
Expand Down

0 comments on commit 3a073e8

Please sign in to comment.