From 9d5dde271f2714bc97bf39c7d66b26e3540b18ed Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Wed, 27 Jan 2016 09:00:25 +0000 Subject: [PATCH] Add final modifier to private fields. git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1726967 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/http/impl/client/cache/CacheConfig.java | 4 ++-- .../apache/http/impl/auth/win/WindowsNTLMSchemeFactory.java | 2 +- .../http/impl/auth/win/WindowsNegotiateSchemeFactory.java | 2 +- .../org/apache/http/conn/ssl/SSLContextBuilder.java | 4 ++-- .../org/apache/http/client/entity/DeflateInputStream.java | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java index 3c4a55e7a..89fda7f15 100644 --- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java +++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java @@ -164,8 +164,8 @@ public class CacheConfig implements Cloneable { private long maxObjectSize; private int maxCacheEntries; private int maxUpdateRetries; - private boolean allow303Caching; - private boolean weakETagOnPutDeleteAllowed; + private final boolean allow303Caching; + private final boolean weakETagOnPutDeleteAllowed; private boolean heuristicCachingEnabled; private float heuristicCoefficient; private long heuristicDefaultLifetime; diff --git a/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNTLMSchemeFactory.java b/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNTLMSchemeFactory.java index 94f715a50..21bed6409 100644 --- a/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNTLMSchemeFactory.java +++ b/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNTLMSchemeFactory.java @@ -45,7 +45,7 @@ import org.apache.http.protocol.HttpContext; @Immutable public class WindowsNTLMSchemeFactory implements AuthSchemeProvider { - private String servicePrincipalName; + private final String servicePrincipalName; public WindowsNTLMSchemeFactory(final String servicePrincipalName) { super(); diff --git a/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateSchemeFactory.java b/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateSchemeFactory.java index b1e3e5743..29e5ffdb5 100644 --- a/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateSchemeFactory.java +++ b/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateSchemeFactory.java @@ -45,7 +45,7 @@ import org.apache.http.protocol.HttpContext; @Immutable public class WindowsNegotiateSchemeFactory implements AuthSchemeProvider { - private String servicePrincipalName; + private final String servicePrincipalName; public WindowsNegotiateSchemeFactory(final String servicePrincipalName) { super(); diff --git a/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java b/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java index 44aa39799..c54db0c52 100644 --- a/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java +++ b/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java @@ -68,8 +68,8 @@ public class SSLContextBuilder { static final String SSL = "SSL"; private String protocol; - private Set keymanagers; - private Set trustmanagers; + private final Set keymanagers; + private final Set trustmanagers; private SecureRandom secureRandom; public SSLContextBuilder() { diff --git a/httpclient/src/main/java/org/apache/http/client/entity/DeflateInputStream.java b/httpclient/src/main/java/org/apache/http/client/entity/DeflateInputStream.java index 24f7d048b..75d5a6ac7 100644 --- a/httpclient/src/main/java/org/apache/http/client/entity/DeflateInputStream.java +++ b/httpclient/src/main/java/org/apache/http/client/entity/DeflateInputStream.java @@ -39,7 +39,7 @@ import java.util.zip.ZipException; */ public class DeflateInputStream extends InputStream { - private InputStream sourceStream; + private final InputStream sourceStream; public DeflateInputStream(final InputStream wrapped) throws IOException {