hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r939845 - in /httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl: BasicHttpCache.java CacheInvalidator.java CombinedInputStream.java ResponseCachingPolicy.java SizeLimitedResponseReader.java
Date Fri, 30 Apr 2010 22:18:39 GMT
Author: sebb
Date: Fri Apr 30 22:18:38 2010
New Revision: 939845

URL: http://svn.apache.org/viewvc?rev=939845&view=rev
Log:
Make private immutable variables final

Modified:
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/BasicHttpCache.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CacheInvalidator.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CombinedInputStream.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/ResponseCachingPolicy.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/SizeLimitedResponseReader.java

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/BasicHttpCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/BasicHttpCache.java?rev=939845&r1=939844&r2=939845&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/BasicHttpCache.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/BasicHttpCache.java
Fri Apr 30 22:18:38 2010
@@ -41,19 +41,20 @@ import org.apache.http.client.cache.Http
  */
 public class BasicHttpCache implements HttpCache<CacheEntry> {
 
-    private LinkedHashMap<String, CacheEntry> baseMap = new LinkedHashMap<String,
CacheEntry>(20,
+    private final LinkedHashMap<String, CacheEntry> baseMap = new LinkedHashMap<String,
CacheEntry>(20,
             0.75f, true) {
 
         private static final long serialVersionUID = -7750025207539768511L;
 
+        @Override
         protected boolean removeEldestEntry(Map.Entry<String, CacheEntry> eldest) {
             return size() > maxEntries;
         }
     };
 
-    private Map<String, CacheEntry> syncMap;
+    private final Map<String, CacheEntry> syncMap;
 
-    private int maxEntries;
+    private final int maxEntries;
 
     public BasicHttpCache(int maxEntries) {
         this.maxEntries = maxEntries;

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CacheInvalidator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CacheInvalidator.java?rev=939845&r1=939844&r2=939845&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CacheInvalidator.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CacheInvalidator.java
Fri Apr 30 22:18:38 2010
@@ -43,8 +43,8 @@ import org.apache.http.client.cache.Http
  */
 public class CacheInvalidator {
 
-    private HttpCache<CacheEntry> cache;
-    private URIExtractor uriExtractor;
+    private final HttpCache<CacheEntry> cache;
+    private final URIExtractor uriExtractor;
 
     private static final Log LOG = LogFactory.getLog(CacheInvalidator.class);
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CombinedInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CombinedInputStream.java?rev=939845&r1=939844&r2=939845&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CombinedInputStream.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/CombinedInputStream.java
Fri Apr 30 22:18:38 2010
@@ -36,8 +36,8 @@ import java.io.InputStream;
  */
 class CombinedInputStream extends InputStream {
 
-    private InputStream inputStream1;
-    private InputStream inputStream2;
+    private final InputStream inputStream1;
+    private final InputStream inputStream2;
 
     /**
      *

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/ResponseCachingPolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/ResponseCachingPolicy.java?rev=939845&r1=939844&r2=939845&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/ResponseCachingPolicy.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/ResponseCachingPolicy.java
Fri Apr 30 22:18:38 2010
@@ -43,7 +43,7 @@ import org.apache.http.impl.cookie.DateU
  */
 public class ResponseCachingPolicy {
 
-    private int maxObjectSizeBytes;
+    private final int maxObjectSizeBytes;
     private static final Log LOG = LogFactory.getLog(ResponseCachingPolicy.class);
 
     public ResponseCachingPolicy(int maxObjectSizeBytes) {

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/SizeLimitedResponseReader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/SizeLimitedResponseReader.java?rev=939845&r1=939844&r2=939845&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/SizeLimitedResponseReader.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/impl/SizeLimitedResponseReader.java
Fri Apr 30 22:18:38 2010
@@ -42,8 +42,8 @@ import org.apache.http.message.BasicHttp
  */
 public class SizeLimitedResponseReader {
 
-    private int maxResponseSizeBytes;
-    private HttpResponse response;
+    private final int maxResponseSizeBytes;
+    private final HttpResponse response;
     ByteArrayOutputStream outputStream;
     InputStream contentInputStream;
 



Mime
View raw message