hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1172301 [1/3] - in /httpcomponents/httpclient/trunk: ./ httpclient-cache/src/main/java/org/apache/http/client/cache/ httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ httpclient-cache/src/main/java/org/apache/http/impl/clie...
Date Sun, 18 Sep 2011 16:20:22 GMT
Author: olegk
Date: Sun Sep 18 16:20:20 2011
New Revision: 1172301

URL: http://svn.apache.org/viewvc?rev=1172301&view=rev
Log:
TABS -> SPACES

Modified:
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/CacheResponseStatus.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntry.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntrySerializer.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheStorage.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateCallback.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateException.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/InputLimit.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/package.html
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidator.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheInvalidator.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheMap.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheValidityPolicy.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClient.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ConditionalRequestBuilder.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HttpCache.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseCachingPolicy.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProtocolCompliance.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/Variant.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/EhcacheHttpCacheStorage.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/package.html
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/package.html
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/package.html
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/client/cache/TestHttpCacheEntry.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/AbstractProtocolTest.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/Counter.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/OKStatus.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/RequestEquivalent.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidationRequest.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidator.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCacheEntryUpdater.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCacheInvalidator.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCacheValidityPolicy.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachedResponseSuitabilityChecker.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachingHttpClient.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestHttpCacheEntrySerializers.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolDeviations.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolRecommendations.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestProtocolRequirements.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestRFC5861Compliance.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestRequestProtocolCompliance.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestResponseCachingPolicy.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestResponseProtocolCompliance.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/RedirectStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ServiceUnavailableRetryStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/Idn.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/JdkIdn.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/utils/Rfc3492Idn.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/DnsResolver.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/ClientCookie.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AutoRetryHttpClient.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultServiceUnavailableRetryStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/InMemoryDnsResolver.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965CommentUrlAttributeHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965DiscardAttributeHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965DomainAttributeHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965VersionAttributeHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRequestAddCookies.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/utils/TestURIUtils.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/utils/TestURLEncodedUtils.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/MockClock.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestAIMDBackoffManager.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestDefaultBackoffStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestDefaultHttpRequestRetryHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestNullBackoffStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/ConnPoolBench.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultClientConnectOperator.java
    httpcomponents/httpclient/trunk/httpmime/pom.xml
    httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/HttpMultipart.java
    httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java
    httpcomponents/httpclient/trunk/pom.xml

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/CacheResponseStatus.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/CacheResponseStatus.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/CacheResponseStatus.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/CacheResponseStatus.java Sun Sep 18 16:20:20 2011
@@ -28,7 +28,7 @@ package org.apache.http.client.cache;
 
 /**
  * This enumeration represents the various ways a response can be generated
- * by the {@link org.apache.http.impl.client.cache.CachingHttpClient}; 
+ * by the {@link org.apache.http.impl.client.cache.CachingHttpClient};
  * if a request is executed with an {@link org.apache.http.protocol.HttpContext}
  * then a parameter with one of these values will be registered in the
  * context under the key

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntry.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntry.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntry.java Sun Sep 18 16:20:20 2011
@@ -110,7 +110,7 @@ public class HttpCacheEntry implements S
             ? new HashMap<String,String>(variantMap)
             : null;
     }
-    
+
     /**
      * Create a new {@link HttpCacheEntry}.
      *
@@ -207,7 +207,7 @@ public class HttpCacheEntry implements S
     public Resource getResource() {
         return this.resource;
     }
-    
+
     /**
      * Indicates whether the origin response indicated the associated
      * resource had variants (i.e. that the Vary header was set on the

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntrySerializer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntrySerializer.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntrySerializer.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheEntrySerializer.java Sun Sep 18 16:20:20 2011
@@ -33,7 +33,7 @@ import java.io.OutputStream;
 /**
  * Used by some {@link HttpCacheStorage} implementations to serialize
  * {@link HttpCacheEntry} instances to a byte representation before
- * storage. 
+ * storage.
  */
 public interface HttpCacheEntrySerializer {
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheStorage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheStorage.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheStorage.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheStorage.java Sun Sep 18 16:20:20 2011
@@ -33,7 +33,7 @@ import java.io.IOException;
  * interface. They can then be plugged into the existing
  * {@link org.apache.http.impl.client.cache.CachingHttpClient}
  * implementation.
- * 
+ *
  * @since 4.1
  */
 public interface HttpCacheStorage {
@@ -68,7 +68,7 @@ public interface HttpCacheStorage {
      * Atomically applies the given callback to update an existing cache
      * entry under a given key.
      * @param key indicates which entry to modify
-     * @param callback performs the update; see 
+     * @param callback performs the update; see
      *   {@link HttpCacheUpdateCallback} for details, but roughly the
      *   callback expects to be handed the current entry and will return
      *   the new value for the entry.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateCallback.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateCallback.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateCallback.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateCallback.java Sun Sep 18 16:20:20 2011
@@ -49,4 +49,4 @@ public interface HttpCacheUpdateCallback
      */
     HttpCacheEntry update(HttpCacheEntry existing) throws IOException;
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateException.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateException.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheUpdateException.java Sun Sep 18 16:20:20 2011
@@ -45,4 +45,4 @@ public class HttpCacheUpdateException ex
         initCause(cause);
     }
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/InputLimit.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/InputLimit.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/InputLimit.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/InputLimit.java Sun Sep 18 16:20:20 2011
@@ -31,7 +31,7 @@ import org.apache.http.annotation.NotThr
 /**
  * Used to limiting the size of an incoming response body of
  * unknown size that is optimistically being read in anticipation
- * of caching it. 
+ * of caching it.
  * @since 4.1
  */
 @NotThreadSafe // reached

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/package.html
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/package.html?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/package.html (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/package.html Sun Sep 18 16:20:20 2011
@@ -12,7 +12,7 @@ to you under the Apache License, Version
 with the License.  You may obtain a copy of the License at
 
   http://www.apache.org/licenses/LICENSE-2.0
-  
+
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -51,7 +51,7 @@ the {@code CachingHttpClient} to indicat
 processed by the caching module itself.
 </p>
 <p>
-New storage backends will need to implement the 
+New storage backends will need to implement the
 {@link org.apache.http.client.cache.HttpCacheStorage}
 interface; they can then be passed to one of the {@code CachingHttpClient}
 constructors, which will happily make use of the new storage mechanism.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java Sun Sep 18 16:20:20 2011
@@ -37,7 +37,7 @@ import org.apache.http.protocol.HttpCont
 
 /**
  * Class used to represent an asynchronous revalidation event, such as with
- * "stale-while-revalidate" 
+ * "stale-while-revalidate"
  */
 class AsynchronousValidationRequest implements Runnable {
     private final AsynchronousValidator parent;
@@ -47,12 +47,12 @@ class AsynchronousValidationRequest impl
     private final HttpContext context;
     private final HttpCacheEntry cacheEntry;
     private final String identifier;
-    
+
     private final Log log = LogFactory.getLog(getClass());
-    
+
     /**
      * Used internally by {@link AsynchronousValidator} to schedule a
-     * revalidation.   
+     * revalidation.
      * @param cachingClient
      * @param target
      * @param request
@@ -74,7 +74,7 @@ class AsynchronousValidationRequest impl
         this.cacheEntry = cacheEntry;
         this.identifier = identifier;
     }
-    
+
     public void run() {
         try {
             cachingClient.revalidateCacheEntry(target, request, context, cacheEntry);
@@ -90,5 +90,5 @@ class AsynchronousValidationRequest impl
     String getIdentifier() {
         return identifier;
     }
-    
+
 }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidator.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidator.java Sun Sep 18 16:20:20 2011
@@ -51,20 +51,20 @@ class AsynchronousValidator {
     private final ExecutorService executor;
     private final Set<String> queued;
     private final CacheKeyGenerator cacheKeyGenerator;
-    
+
     private final Log log = LogFactory.getLog(getClass());
-    
+
     /**
      * Create AsynchronousValidator which will make revalidation requests
-     * using the supplied {@link CachingHttpClient}, and 
+     * using the supplied {@link CachingHttpClient}, and
      * a {@link ThreadPoolExecutor} generated according to the thread
-     * pool settings provided in the given {@link CacheConfig}. 
+     * pool settings provided in the given {@link CacheConfig}.
      * @param cachingClient used to execute asynchronous requests
      * @param config specifies thread pool settings. See
      * {@link CacheConfig#getAsynchronousWorkersMax()},
      * {@link CacheConfig#getAsynchronousWorkersCore()},
      * {@link CacheConfig#getAsynchronousWorkerIdleLifetimeSecs()},
-     * and {@link CacheConfig#getRevalidationQueueSize()}. 
+     * and {@link CacheConfig#getRevalidationQueueSize()}.
      */
     public AsynchronousValidator(CachingHttpClient cachingClient,
             CacheConfig config) {
@@ -76,7 +76,7 @@ class AsynchronousValidator {
                         new ArrayBlockingQueue<Runnable>(config.getRevalidationQueueSize()))
                 );
     }
-    
+
     /**
      * Create AsynchronousValidator which will make revalidation requests
      * using the supplied {@link CachingHttpClient} and
@@ -91,10 +91,10 @@ class AsynchronousValidator {
         this.queued = new HashSet<String>();
         this.cacheKeyGenerator = new CacheKeyGenerator();
     }
-    
+
     /**
      * Schedules an asynchronous revalidation
-     * 
+     *
      * @param target
      * @param request
      * @param context
@@ -104,7 +104,7 @@ class AsynchronousValidator {
             HttpRequest request, HttpContext context, HttpCacheEntry entry) {
         // getVariantURI will fall back on getURI if no variants exist
         String uri = cacheKeyGenerator.getVariantURI(target, request, entry);
-        
+
         if (!queued.contains(uri)) {
             AsynchronousValidationRequest revalidationRequest =
                 new AsynchronousValidationRequest(this, cachingClient, target,
@@ -121,7 +121,7 @@ class AsynchronousValidator {
 
     /**
      * Removes an identifier from the internal list of revalidation jobs in
-     * progress.  This is meant to be called by 
+     * progress.  This is meant to be called by
      * {@link AsynchronousValidationRequest#run()} once the revalidation is
      * complete, using the identifier passed in during constructions.
      * @param identifier
@@ -129,11 +129,11 @@ class AsynchronousValidator {
     synchronized void markComplete(String identifier) {
         queued.remove(identifier);
     }
-    
+
     Set<String> getScheduledIdentifiers() {
         return Collections.unmodifiableSet(queued);
     }
-    
+
     ExecutorService getExecutor() {
         return executor;
     }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java Sun Sep 18 16:20:20 2011
@@ -83,7 +83,7 @@ class BasicHttpCache implements HttpCach
         String uri = uriExtractor.getURI(host, request);
         storage.removeEntry(uri);
     }
-    
+
     public void flushInvalidatedCacheEntriesFor(HttpHost host, HttpRequest request, HttpResponse response) {
         cacheInvalidator.flushInvalidatedCacheEntries(host, request, response);
     }
@@ -193,7 +193,7 @@ class BasicHttpCache implements HttpCach
         if (src == null) {
             src = entry;
         }
-        
+
         Resource resource = resourceFactory.copy(requestId, src.getResource());
         Map<String,String> variantMap = new HashMap<String,String>(src.getVariantMap());
         variantMap.put(variantKey, variantCacheKey);
@@ -231,7 +231,7 @@ class BasicHttpCache implements HttpCach
         storage.putEntry(cacheKey, updatedEntry);
         return updatedEntry;
     }
-    
+
     public HttpResponse cacheAndReturnResponse(HttpHost host, HttpRequest request,
             HttpResponse originResponse, Date requestSent, Date responseReceived)
             throws IOException {
@@ -300,4 +300,4 @@ class BasicHttpCache implements HttpCach
         variants.put(etagHeader.getValue(), new Variant(variantKey, variantCacheKey, entry));
     }
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java Sun Sep 18 16:20:20 2011
@@ -82,4 +82,4 @@ class BasicIdGenerator {
         return buffer.toString();
     }
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java Sun Sep 18 16:20:20 2011
@@ -33,19 +33,19 @@ package org.apache.http.impl.client.cach
  * {@code CacheConfig} instance has sane and conservative defaults, so the
  * easiest way to specify options is to get an instance and then set just
  * the options you want to modify from their defaults.</p>
- * 
+ *
  * <p><b>N.B.</b> This class is only for caching-specific configuration; to
- * configure the behavior of the rest of the client, configure the 
+ * configure the behavior of the rest of the client, configure the
  * {@link org.apache.http.client.HttpClient} used as the &quot;backend&quot;
  * for the {@code CachingHttpClient}.</p>
- * 
+ *
  * <p>Cache configuration can be grouped into the following categories:</p>
- * 
+ *
  * <p><b>Cache size.</b> If the backend storage supports these limits, you
  * can specify the {@link CacheConfig#setMaxCacheEntries maximum number of
  * cache entries} as well as the {@link CacheConfig#setMaxObjectSizeBytes
  * maximum cacheable response body size}.</p>
- * 
+ *
  * <p><b>Public/private caching.</b> By default, the caching module considers
  * itself to be a shared (public) cache, and will not, for example, cache
  * responses to requests with {@code Authorization} headers or responses
@@ -53,7 +53,7 @@ package org.apache.http.impl.client.cach
  * is only going to be used by one logical "user" (behaving similarly to a
  * browser cache), then you will want to {@link
  * CacheConfig#setSharedCache(boolean) turn off the shared cache setting}.</p>
- * 
+ *
  * <p><b>Heuristic caching</b>. Per RFC2616, a cache may cache certain cache
  * entries even if no explicit cache control headers are set by the origin.
  * This behavior is off by default, but you may want to turn this on if you
@@ -67,7 +67,7 @@ package org.apache.http.impl.client.cach
  * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.2">
  * 13.2.2</a> and <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.4">
  * 13.2.4</a> of the HTTP/1.1 RFC for more details on heuristic caching.</p>
- * 
+ *
  * <p><b>Background validation</b>. The cache module supports the
  * {@code stale-while-revalidate} directive of
  * <a href="http://tools.ietf.org/html/rfc5861">RFC5861</a>, which allows
@@ -79,7 +79,7 @@ package org.apache.http.impl.client.cach
  * CacheConfig#setAsynchronousWorkerIdleLifetimeSecs(int) maximum time they
  * can be idle before being reclaimed}. You can also control the {@link
  * CacheConfig#setRevalidationQueueSize(int) size of the queue} used for
- * revalidations when there aren't enough workers to keep up with demand.</b> 
+ * revalidations when there aren't enough workers to keep up with demand.</b>
  */
 public class CacheConfig {
 
@@ -115,22 +115,22 @@ public class CacheConfig {
     /** Default number of worker threads to allow for background revalidations
      * resulting from the stale-while-revalidate directive.
      */
-    public static final int DEFAULT_ASYNCHRONOUS_WORKERS_MAX = 1; 
+    public static final int DEFAULT_ASYNCHRONOUS_WORKERS_MAX = 1;
 
     /** Default minimum number of worker threads to allow for background
      * revalidations resulting from the stale-while-revalidate directive.
      */
     public static final int DEFAULT_ASYNCHRONOUS_WORKERS_CORE = 1;
-    
+
     /** Default maximum idle lifetime for a background revalidation thread
      * before it gets reclaimed.
      */
     public static final int DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS = 60;
-    
-    /** Default maximum queue length for background revalidation requests. 
+
+    /** Default maximum queue length for background revalidation requests.
      */
     public static final int DEFAULT_REVALIDATION_QUEUE_SIZE = 100;
-    
+
     private int maxObjectSizeBytes = DEFAULT_MAX_OBJECT_SIZE_BYTES;
     private int maxCacheEntries = DEFAULT_MAX_CACHE_ENTRIES;
     private int maxUpdateRetries = DEFAULT_MAX_UPDATE_RETRIES;
@@ -236,7 +236,7 @@ public class CacheConfig {
      * and {@code Date} headers of a cached response during which the cached
      * response will be considered heuristically fresh.
      * @param heuristicCoefficient should be between {@code 0.0} and
-     *   {@code 1.0}. 
+     *   {@code 1.0}.
      */
     public void setHeuristicCoefficient(float heuristicCoefficient) {
         this.heuristicCoefficient = heuristicCoefficient;
@@ -255,7 +255,7 @@ public class CacheConfig {
      * calculation is not possible. Explicit cache control directives on
      * either the request or origin response will override this, as will
      * the heuristic {@code Last-Modified} freshness calculation if it is
-     * available. 
+     * available.
      * @param heuristicDefaultLifetimeSecs is the number of seconds to
      *   consider a cache-eligible response fresh in the absence of other
      *   information. Set this to {@code 0} to disable this style of
@@ -276,9 +276,9 @@ public class CacheConfig {
 
     /**
      * Sets the maximum number of threads to allow for background
-     * revalidations due to the {@code stale-while-revalidate} directive. 
+     * revalidations due to the {@code stale-while-revalidate} directive.
      * @param max number of threads; a value of 0 disables background
-     * revalidations. 
+     * revalidations.
      */
     public void setAsynchronousWorkersMax(int max) {
         this.asynchronousWorkersMax = max;
@@ -286,7 +286,7 @@ public class CacheConfig {
 
     /**
      * Returns the minimum number of threads to keep alive for background
-     * revalidations due to the {@code stale-while-revalidate} directive. 
+     * revalidations due to the {@code stale-while-revalidate} directive.
      */
     public int getAsynchronousWorkersCore() {
         return asynchronousWorkersCore;
@@ -296,7 +296,7 @@ public class CacheConfig {
      * Sets the minimum number of threads to keep alive for background
      * revalidations due to the {@code stale-while-revalidate} directive.
      * @param min should be greater than zero and less than or equal
-     *   to <code>getAsynchronousWorkersMax()</code> 
+     *   to <code>getAsynchronousWorkersMax()</code>
      */
     public void setAsynchronousWorkersCore(int min) {
         this.asynchronousWorkersCore = min;
@@ -337,5 +337,5 @@ public class CacheConfig {
         this.revalidationQueueSize = size;
     }
 
-    
+
 }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheInvalidator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheInvalidator.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheInvalidator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheInvalidator.java Sun Sep 18 16:20:20 2011
@@ -172,7 +172,7 @@ class CacheInvalidator {
         }
         return relURL;
     }
-    
+
     protected boolean requestShouldNotBeCached(HttpRequest req) {
         String method = req.getRequestLine().getMethod();
         return notGetOrHeadRequest(method);
@@ -184,7 +184,7 @@ class CacheInvalidator {
     }
 
     /** Flushes entries that were invalidated by the given response
-     * received for the given host/request pair. 
+     * received for the given host/request pair.
      */
     public void flushInvalidatedCacheEntries(HttpHost host,
             HttpRequest request, HttpResponse response) {
@@ -200,7 +200,7 @@ class CacheInvalidator {
 
         if (!responseDateNewerThanEntryDate(response, entry)) return;
         if (!responseAndEntryEtagsDiffer(response, entry)) return;
-        
+
         flushUriIfSameHost(reqURL, canonURL);
     }
 
@@ -210,7 +210,7 @@ class CacheInvalidator {
         String contentLocation = clHeader.getValue();
         URL canonURL = getAbsoluteURL(contentLocation);
         if (canonURL != null) return canonURL;
-        return getRelativeURL(reqURL, contentLocation); 
+        return getRelativeURL(reqURL, contentLocation);
     }
 
     private boolean responseAndEntryEtagsDiffer(HttpResponse response,

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java Sun Sep 18 16:20:20 2011
@@ -144,7 +144,7 @@ class CacheKeyGenerator {
      * Compute a "variant key" from the headers of a given request that are
      * covered by the Vary header of a given cache entry. Any request whose
      * varying headers match those of this request should have the same
-     * variant key. 
+     * variant key.
      * @param req originating request
      * @param entry cache entry in question that has variants
      * @return a <code>String</code> variant key
@@ -179,4 +179,4 @@ class CacheKeyGenerator {
         return buf.toString();
     }
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheMap.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheMap.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheMap.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheMap.java Sun Sep 18 16:20:20 2011
@@ -47,4 +47,4 @@ final class CacheMap extends LinkedHashM
         return size() > this.maxEntries;
     }
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheValidityPolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheValidityPolicy.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheValidityPolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheValidityPolicy.java Sun Sep 18 16:20:20 2011
@@ -119,7 +119,7 @@ class CacheValidityPolicy {
     public boolean proxyRevalidate(final HttpCacheEntry entry) {
         return hasCacheControlDirective(entry, "proxy-revalidate");
     }
-    
+
     public boolean mayReturnStaleWhileRevalidating(final HttpCacheEntry entry, Date now) {
         for (Header h : entry.getHeaders("Cache-Control")) {
             for(HeaderElement elt : h.getElements()) {
@@ -135,10 +135,10 @@ class CacheValidityPolicy {
                 }
             }
         }
-        
+
         return false;
     }
-    
+
     public boolean mayReturnStaleIfError(HttpRequest request,
             HttpCacheEntry entry, Date now) {
         long stalenessSecs = getStalenessSecs(entry, now);
@@ -147,7 +147,7 @@ class CacheValidityPolicy {
                 || mayReturnStaleIfError(entry.getHeaders("Cache-Control"),
                                          stalenessSecs);
     }
-    
+
     private boolean mayReturnStaleIfError(Header[] headers, long stalenessSecs) {
         boolean result = false;
         for(Header h : headers) {
@@ -206,8 +206,8 @@ class CacheValidityPolicy {
 
     protected boolean hasContentLengthHeader(HttpCacheEntry entry) {
         return null != entry.getFirstHeader(HTTP.CONTENT_LEN);
-	}
-    
+    }
+
     /**
      * This matters for deciding whether the cache entry is valid to serve as a
      * response. If these values do not match, we might have a partial response

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClient.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClient.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClient.java Sun Sep 18 16:20:20 2011
@@ -79,7 +79,7 @@ import org.apache.http.util.VersionInfo;
  * related configuration you want to do vis-a-vis timeouts and connection
  * pools should be done on this backend client before constructing a {@code
  * CachingHttpClient} from it.</p>
- * 
+ *
  * <p>Generally speaking, the {@code CachingHttpClient} is implemented as a
  * <a href="http://en.wikipedia.org/wiki/Decorator_pattern">Decorator</a>
  * of the backend client; for any incoming request it attempts to satisfy
@@ -92,7 +92,7 @@ import org.apache.http.util.VersionInfo;
  * This notion of "semantic transparency" means you should be able to drop
  * a {@link CachingHttpClient} into an existing application without breaking
  * anything.</p>
- * 
+ *
  * <p>Folks that would like to experiment with alternative storage backends
  * should look at the {@link HttpCacheStorage} interface and the related
  * package documentation there. You may also be interested in the provided
@@ -137,7 +137,7 @@ public class CachingHttpClient implement
     private final RequestProtocolCompliance requestCompliance;
 
     private final AsynchronousValidator asynchRevalidator;
-    
+
     private final Log log = LogFactory.getLog(getClass());
 
     CachingHttpClient(
@@ -226,7 +226,7 @@ public class CachingHttpClient implement
      * response bodies are managed using the given {@link ResourceFactory}.
      * @param client used to make origin requests
      * @param resourceFactory how to manage cached response bodies
-     * @param storage where to store cache entries 
+     * @param storage where to store cache entries
      * @param config cache module options
      */
     public CachingHttpClient(
@@ -244,7 +244,7 @@ public class CachingHttpClient implement
      * that stores cache entries in the provided storage backend and uses
      * the given {@link HttpClient} for backend requests.
      * @param client used to make origin requests
-     * @param storage where to store cache entries 
+     * @param storage where to store cache entries
      * @param config cache module options
      */
     public CachingHttpClient(
@@ -282,7 +282,7 @@ public class CachingHttpClient implement
         this.requestCompliance = requestCompliance;
         this.asynchRevalidator = makeAsynchronousValidator(config);
     }
-    
+
     private AsynchronousValidator makeAsynchronousValidator(
             CacheConfig config) {
         if (config.getAsynchronousWorkersMax() > 0) {
@@ -292,7 +292,7 @@ public class CachingHttpClient implement
     }
 
     /**
-     * Reports the number of times that the cache successfully responded 
+     * Reports the number of times that the cache successfully responded
      * to an {@link HttpRequest} without contacting the origin server.
      * @return the number of cache hits
      */
@@ -395,7 +395,7 @@ public class CachingHttpClient implement
             return handleCacheMiss(target, request, context);
         }
 
-        return handleCacheHit(target, request, context, entry); 
+        return handleCacheHit(target, request, context, entry);
     }
 
     private HttpResponse handleCacheHit(HttpHost target, HttpRequest request,
@@ -428,9 +428,9 @@ public class CachingHttpClient implement
                 && !staleResponseNotAllowed(request, entry, now)
                 && validityPolicy.mayReturnStaleWhileRevalidating(entry, now)) {
                 final HttpResponse resp = generateCachedResponse(request, context, entry, now);
-                
+
                 asynchRevalidator.revalidateCacheEntry(target, request, context, entry);
-                
+
                 return resp;
             }
             return revalidateCacheEntry(target, request, context, entry);
@@ -468,12 +468,12 @@ public class CachingHttpClient implement
         }
         return entry;
     }
-    
+
     private HttpResponse getFatallyNoncompliantResponse(HttpRequest request,
             HttpContext context) {
         HttpResponse fatalErrorResponse = null;
         List<RequestProtocolError> fatalError = requestCompliance.requestIsFatallyNonCompliant(request);
-        
+
         for (RequestProtocolError error : fatalError) {
             setResponseStatus(context, CacheResponseStatus.CACHE_MODULE_RESPONSE);
             fatalErrorResponse = requestCompliance.getErrorForRequest(error);
@@ -507,7 +507,7 @@ public class CachingHttpClient implement
             log.trace("Cache hit [host: " + target + "; uri: " + rl.getUri() + "]");
         }
     }
-    
+
     private void recordCacheUpdate(HttpContext context) {
         cacheUpdates.getAndIncrement();
         setResponseStatus(context, CacheResponseStatus.VALIDATED);
@@ -599,7 +599,7 @@ public class CachingHttpClient implement
         }
         return false;
     }
-    
+
     private String generateViaHeader(HttpMessage msg) {
         final VersionInfo vi = VersionInfo.loadVersionInfo("org.apache.http.client", getClass().getClassLoader());
         final String release = (vi != null) ? vi.getRelease() : VersionInfo.UNAVAILABLE;
@@ -690,7 +690,7 @@ public class CachingHttpClient implement
         }
         return false;
     }
-    
+
     HttpResponse negotiateResponseFromVariants(HttpHost target,
             HttpRequest request, HttpContext context,
             Map<String, Variant> variants) throws IOException {
@@ -720,12 +720,12 @@ public class CachingHttpClient implement
         }
 
         HttpCacheEntry matchedEntry = matchingVariant.getEntry();
-        
+
         if (revalidationResponseIsTooOld(backendResponse, matchedEntry)) {
             return retryRequestUnconditionally(target, request, context,
                     matchedEntry);
         }
-        
+
         recordCacheUpdate(context);
 
         HttpCacheEntry responseEntry = getUpdatedVariantEntry(target,
@@ -815,13 +815,13 @@ public class CachingHttpClient implement
             }
             return responseGenerator.generateResponse(updatedEntry);
         }
-        
+
         if (staleIfErrorAppliesTo(statusCode)
             && !staleResponseNotAllowed(request, cacheEntry, getCurrentDate())
             && validityPolicy.mayReturnStaleIfError(request, cacheEntry, responseDate)) {
             final HttpResponse cachedResponse = responseGenerator.generateResponse(cacheEntry);
             cachedResponse.addHeader(HeaderConstants.WARNING, "110 localhost \"Response is stale\"");
-            return cachedResponse; 
+            return cachedResponse;
         }
 
         return handleBackendResponse(target, conditionalRequest, requestDate, responseDate,
@@ -829,9 +829,9 @@ public class CachingHttpClient implement
     }
 
     private boolean staleIfErrorAppliesTo(int statusCode) {
-        return statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR  
-                || statusCode == HttpStatus.SC_BAD_GATEWAY  
-                || statusCode == HttpStatus.SC_SERVICE_UNAVAILABLE  
+        return statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR
+                || statusCode == HttpStatus.SC_BAD_GATEWAY
+                || statusCode == HttpStatus.SC_SERVICE_UNAVAILABLE
                 || statusCode == HttpStatus.SC_GATEWAY_TIMEOUT;
     }
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ConditionalRequestBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ConditionalRequestBuilder.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ConditionalRequestBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ConditionalRequestBuilder.java Sun Sep 18 16:20:20 2011
@@ -46,7 +46,7 @@ import org.apache.http.impl.client.Reque
 class ConditionalRequestBuilder {
 
     private static final Log log = LogFactory.getLog(ConditionalRequestBuilder.class);
-    
+
     /**
      * When a {@link HttpCacheEntry} is stale but 'might' be used as a response
      * to an {@link HttpRequest} we will attempt to revalidate the entry with
@@ -117,7 +117,7 @@ class ConditionalRequestBuilder {
             first = false;
             etags.append(etag);
         }
-        
+
         wrapperRequest.setHeader(HeaderConstants.IF_NONE_MATCH, etags.toString());
         return wrapperRequest;
     }
@@ -134,7 +134,7 @@ class ConditionalRequestBuilder {
      * @return an unconditional validation request
      */
     public HttpRequest buildUnconditionalRequest(HttpRequest request,
-            HttpCacheEntry entry) { 
+            HttpCacheEntry entry) {
         RequestWrapper wrapped;
         try {
             wrapped = new RequestWrapper(request);

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HttpCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HttpCache.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HttpCache.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HttpCache.java Sun Sep 18 16:20:20 2011
@@ -56,9 +56,9 @@ interface HttpCache {
      */
     void flushInvalidatedCacheEntriesFor(HttpHost host, HttpRequest request)
         throws IOException;
-    
+
     /** Clear any entries that may be invalidated by the given response to
-     * a particular request. 
+     * a particular request.
      * @param host
      * @param request
      * @param response
@@ -122,7 +122,7 @@ interface HttpCache {
      * Update a specific {@link HttpCacheEntry} representing a cached variant
      * using a 304 {@link HttpResponse}.
      * @param target host for client request
-     * @param request actual request from upstream client 
+     * @param request actual request from upstream client
      * @param stale current variant cache entry
      * @param originResponse 304 response received from origin
      * @param requestSent when the validating request was sent

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java Sun Sep 18 16:20:20 2011
@@ -96,7 +96,7 @@ class RequestProtocolCompliance {
      */
     public HttpRequest makeRequestCompliant(HttpRequest request)
         throws ClientProtocolException {
-    
+
         if (requestMustNotHaveEntity(request)) {
             ((HttpEntityEnclosingRequest) request).setEntity(null);
         }
@@ -116,7 +116,7 @@ class RequestProtocolCompliance {
 
         return request;
     }
-    
+
     private void stripOtherFreshnessDirectivesWithNoCache(HttpRequest request) {
         List<HeaderElement> outElts = new ArrayList<HeaderElement>();
         boolean shouldStrip = false;

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseCachingPolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseCachingPolicy.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseCachingPolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseCachingPolicy.java Sun Sep 18 16:20:20 2011
@@ -198,13 +198,13 @@ class ResponseCachingPolicy {
             log.debug("Response was not cacheable.");
             return false;
         }
-        
+
         String[] uncacheableRequestDirectives = { "no-store" };
         if (hasCacheControlParameterFrom(request,uncacheableRequestDirectives)) {
             return false;
         }
 
-        if (request.getRequestLine().getUri().contains("?") && 
+        if (request.getRequestLine().getUri().contains("?") &&
             (!isExplicitlyCacheable(response) || from1_0Origin(response))) {
             log.debug("Response was not cacheable.");
             return false;
@@ -213,7 +213,7 @@ class ResponseCachingPolicy {
         if (expiresHeaderLessOrEqualToDateHeaderAndNoCacheControl(response)) {
             return false;
         }
-        
+
         if (sharedCache) {
             Header[] authNHeaders = request.getHeaders("Authorization");
             if (authNHeaders != null && authNHeaders.length > 0) {
@@ -249,7 +249,7 @@ class ResponseCachingPolicy {
             for(HeaderElement elt : via.getElements()) {
                 String proto = elt.toString().split("\\s")[0];
                 if (proto.contains("/")) {
-                    return proto.equals("HTTP/1.0"); 
+                    return proto.equals("HTTP/1.0");
                 } else {
                     return proto.equals("1.0");
                 }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProtocolCompliance.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProtocolCompliance.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProtocolCompliance.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProtocolCompliance.java Sun Sep 18 16:20:20 2011
@@ -67,7 +67,7 @@ class ResponseProtocolCompliance {
      *
      * @param request The {@link HttpRequest} that generated an origin hit and response
      * @param response The {@link HttpResponse} from the origin server
-     * @throws IOException 
+     * @throws IOException
      */
     public void ensureProtocolCompliance(HttpRequest request, HttpResponse response)
             throws IOException {
@@ -85,7 +85,7 @@ class ResponseProtocolCompliance {
         ensure200ForOPTIONSRequestWithNoBodyHasContentLengthZero(request, response);
 
         ensure206ContainsDateHeader(response);
-        
+
         ensure304DoesNotContainExtraEntityHeaders(response);
 
         identityIsNotUsedInContentEncoding(response);
@@ -167,9 +167,9 @@ class ResponseProtocolCompliance {
     private void ensurePartialContentIsNotSentToAClientThatDidNotRequestIt(HttpRequest request,
             HttpResponse response) throws IOException {
         if (request.getFirstHeader(HeaderConstants.RANGE) != null
-                || response.getStatusLine().getStatusCode() != HttpStatus.SC_PARTIAL_CONTENT) 
+                || response.getStatusLine().getStatusCode() != HttpStatus.SC_PARTIAL_CONTENT)
             return;
-        
+
         consumeBody(response);
         throw new ClientProtocolException(UNEXPECTED_PARTIAL_CONTENT);
     }
@@ -213,8 +213,8 @@ class ResponseProtocolCompliance {
         if (response.getStatusLine().getStatusCode() != HttpStatus.SC_CONTINUE) {
             return;
         }
-        
-        HttpRequest originalRequest = requestWasWrapped(request) ? 
+
+        HttpRequest originalRequest = requestWasWrapped(request) ?
                 ((RequestWrapper)request).getOriginal() : request;
         if (originalRequest instanceof HttpEntityEnclosingRequest) {
             if (((HttpEntityEnclosingRequest)originalRequest).expectContinue()) return;

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/Variant.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/Variant.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/Variant.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/Variant.java Sun Sep 18 16:20:20 2011
@@ -44,11 +44,11 @@ class Variant {
     public String getVariantKey() {
         return variantKey;
     }
-    
+
     public String getCacheKey() {
         return cacheKey;
     }
-    
+
     public HttpCacheEntry getEntry() {
         return entry;
     }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/EhcacheHttpCacheStorage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/EhcacheHttpCacheStorage.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/EhcacheHttpCacheStorage.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/EhcacheHttpCacheStorage.java Sun Sep 18 16:20:20 2011
@@ -47,12 +47,12 @@ import org.apache.http.impl.client.cache
  * In particular, this backend allows for spillover to disk, where the
  * cache can be effectively larger than memory, and cached responses are
  * paged into and out of memory from disk as needed.</p>
- * 
+ *
  * <p><b>N.B.</b> Since the Ehcache is configured ahead of time with a
  * maximum number of cache entries, this effectively ignores the
  * {@link CacheConfig#setMaxCacheEntries(int) maximum cache entries}
  * specified by a provided {@link CacheConfig}.</p>
- * 
+ *
  * <p>Please refer to the <a href="http://ehcache.org/documentation/index.html">
  * Ehcache documentation</a> for details on how to configure the Ehcache
  * itself.</p>
@@ -154,4 +154,4 @@ public class EhcacheHttpCacheStorage imp
         }while(numRetries <= maxUpdateRetries);
         throw new HttpCacheUpdateException("Failed to update");
     }
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/package.html
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/package.html?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/package.html (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/package.html Sun Sep 18 16:20:20 2011
@@ -12,7 +12,7 @@ to you under the Apache License, Version
 with the License.  You may obtain a copy of the License at
 
   http://www.apache.org/licenses/LICENSE-2.0
-  
+
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -31,7 +31,7 @@ information on the Apache Software Found
 
 <p>
 This package contains a storage backend based on
-<a href="http://ehcache.org/">Ehcache</a> 
+<a href="http://ehcache.org/">Ehcache</a>
 that can be plugged into
 a {@link org.apache.http.impl.client.cache.CachingHttpClient} and
 used for storing cache entries.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java Sun Sep 18 16:20:20 2011
@@ -58,18 +58,18 @@ import org.apache.http.impl.client.cache
  * peering of a sort</li>
  * </ol>
  * Note that in a shared memcached pool setting you may wish to make use
- * of the Ketama consistent hashing algorithm to reduce the number of 
+ * of the Ketama consistent hashing algorithm to reduce the number of
  * cache misses that might result if one of the memcached cluster members
  * fails (see the <a href="http://dustin.github.com/java-memcached-client/apidocs/net/spy/memcached/KetamaConnectionFactory.html">
  * KetamaConnectionFactory</a>).
  * </p>
- * 
+ *
  * <p>Please refer to the <a href="http://code.google.com/p/memcached/wiki/NewStart">
  * memcached documentation</a> and in particular to the documentation for
  * the <a href="http://code.google.com/p/spymemcached/">spymemcached
  * documentation</a> for details about how to set up and configure memcached
  * and the Java client used here, respectively.</p>
- * 
+ *
  * @since 4.1
  */
 public class MemcachedHttpCacheStorage implements HttpCacheStorage {
@@ -166,4 +166,4 @@ public class MemcachedHttpCacheStorage i
     } while(numRetries <= maxUpdateRetries);
     throw new HttpCacheUpdateException("Failed to update");
     }
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/package.html
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/package.html?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/package.html (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/package.html Sun Sep 18 16:20:20 2011
@@ -12,7 +12,7 @@ to you under the Apache License, Version
 with the License.  You may obtain a copy of the License at
 
   http://www.apache.org/licenses/LICENSE-2.0
-  
+
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -31,7 +31,7 @@ information on the Apache Software Found
 
 <p>
 This package contains a storage backend based on
-<a href="http://memcached.org/">memcached</a> 
+<a href="http://memcached.org/">memcached</a>
 that can be plugged into
 a {@link org.apache.http.impl.client.cache.CachingHttpClient} and
 used for storing cache entries.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/package.html
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/package.html?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/package.html (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/package.html Sun Sep 18 16:20:20 2011
@@ -12,7 +12,7 @@ to you under the Apache License, Version
 with the License.  You may obtain a copy of the License at
 
   http://www.apache.org/licenses/LICENSE-2.0
-  
+
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/client/cache/TestHttpCacheEntry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/client/cache/TestHttpCacheEntry.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/client/cache/TestHttpCacheEntry.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/client/cache/TestHttpCacheEntry.java Sun Sep 18 16:20:20 2011
@@ -199,21 +199,21 @@ public class TestHttpCacheEntry {
         entry = new HttpCacheEntry(new Date(), new Date(), statusLine,
                 new Header[]{}, mockResource);
         assertSame(statusLine.getProtocolVersion(),
-                entry.getProtocolVersion());        
+                entry.getProtocolVersion());
     }
 
     @Test
     public void reasonPhraseComesFromOriginalStatusLine() {
         entry = new HttpCacheEntry(new Date(), new Date(), statusLine,
                 new Header[]{}, mockResource);
-        assertSame(statusLine.getReasonPhrase(), entry.getReasonPhrase());        
+        assertSame(statusLine.getReasonPhrase(), entry.getReasonPhrase());
     }
 
     @Test
     public void statusCodeComesFromOriginalStatusLine() {
         entry = new HttpCacheEntry(new Date(), new Date(), statusLine,
                 new Header[]{}, mockResource);
-        assertEquals(statusLine.getStatusCode(), entry.getStatusCode());        
+        assertEquals(statusLine.getStatusCode(), entry.getStatusCode());
     }
 
     @Test
@@ -221,7 +221,7 @@ public class TestHttpCacheEntry {
         final Date requestDate = new Date();
         entry = new HttpCacheEntry(requestDate, new Date(), statusLine,
                 new Header[]{}, mockResource);
-        assertSame(requestDate, entry.getRequestDate());        
+        assertSame(requestDate, entry.getRequestDate());
     }
 
     @Test
@@ -229,14 +229,14 @@ public class TestHttpCacheEntry {
         final Date responseDate = new Date();
         entry = new HttpCacheEntry(new Date(), responseDate, statusLine,
                 new Header[]{}, mockResource);
-        assertSame(responseDate, entry.getResponseDate());        
+        assertSame(responseDate, entry.getResponseDate());
     }
 
     @Test
     public void canGetOriginalResource() {
         entry = new HttpCacheEntry(new Date(), new Date(), statusLine,
                 new Header[]{}, mockResource);
-        assertSame(mockResource, entry.getResource());        
+        assertSame(mockResource, entry.getResource());
     }
 
     @Test
@@ -253,7 +253,7 @@ public class TestHttpCacheEntry {
             assertEquals(headers[i], result[i]);
         }
     }
-        
+
     @Test
     public void canConstructWithoutVariants() {
         new HttpCacheEntry(new Date(), new Date(), statusLine,
@@ -266,7 +266,7 @@ public class TestHttpCacheEntry {
                 new Header[]{}, mockResource,
                 new HashMap<String,String>());
     }
-    
+
     @Test
     public void canRetrieveOriginalVariantMap() {
         Map<String,String> variantMap = new HashMap<String,String>();
@@ -280,7 +280,7 @@ public class TestHttpCacheEntry {
         assertEquals("B", result.get("A"));
         assertEquals("D", result.get("C"));
     }
-    
+
     @Test
     public void retrievedVariantMapIsNotModifiable() {
         Map<String,String> variantMap = new HashMap<String,String>();
@@ -301,7 +301,7 @@ public class TestHttpCacheEntry {
         } catch (UnsupportedOperationException expected) {
         }
     }
-    
+
     @Test
     public void canConvertToString() {
         entry = new HttpCacheEntry(new Date(), new Date(), statusLine,

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/AbstractProtocolTest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/AbstractProtocolTest.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/AbstractProtocolTest.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/AbstractProtocolTest.java Sun Sep 18 16:20:20 2011
@@ -113,7 +113,7 @@ public abstract class AbstractProtocolTe
 
         mockCache.flushInvalidatedCacheEntriesFor(EasyMock.isA(HttpHost.class), EasyMock.isA(HttpRequest.class));
         EasyMock.expectLastCall().anyTimes();
-        
+
         mockCache.flushInvalidatedCacheEntriesFor(EasyMock.isA(HttpHost.class), EasyMock.isA(HttpRequest.class), EasyMock.isA(HttpResponse.class));
         EasyMock.expectLastCall().anyTimes();
     }
@@ -127,4 +127,4 @@ public abstract class AbstractProtocolTe
         super();
     }
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/Counter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/Counter.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/Counter.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/Counter.java Sun Sep 18 16:20:20 2011
@@ -38,4 +38,4 @@ public class Counter {
         return count;
     }
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java Sun Sep 18 16:20:20 2011
@@ -76,11 +76,11 @@ public class HttpTestUtils {
         "If-None-Match", "If-Range", "If-Unmodified-Since", "Last-Modified", "Location",
         "Max-Forwards", "Proxy-Authorization", "Range", "Referer", "Retry-After", "Server",
         "User-Agent", "Vary" };
-    
+
     /*
      * "Entity-header fields define metainformation about the entity-body or,
      * if no body is present, about the resource identified by the request."
-     * 
+     *
      * http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.1
      */
     public static final String[] ENTITY_HEADERS = { "Allow", "Content-Encoding",
@@ -341,4 +341,4 @@ public class HttpTestUtils {
         return new BasicHttpResponse(HttpVersion.HTTP_1_1,
                 HttpStatus.SC_INTERNAL_SERVER_ERROR, "Internal Server Error");
     }
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/OKStatus.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/OKStatus.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/OKStatus.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/OKStatus.java Sun Sep 18 16:20:20 2011
@@ -38,4 +38,4 @@ public class OKStatus extends BasicStatu
         super(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK");
     }
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/RequestEquivalent.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/RequestEquivalent.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/RequestEquivalent.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/RequestEquivalent.java Sun Sep 18 16:20:20 2011
@@ -50,4 +50,4 @@ public class RequestEquivalent implement
         buf.append(")");
     }
 
-}
\ No newline at end of file
+}

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidationRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidationRequest.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidationRequest.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidationRequest.java Sun Sep 18 16:20:20 2011
@@ -46,7 +46,7 @@ public class TestAsynchronousValidationR
     private HttpRequest request;
     private HttpContext mockContext;
     private HttpCacheEntry mockCacheEntry;
-    
+
     @Before
     public void setUp() {
         mockParent = EasyMock.createMock(AsynchronousValidator.class);
@@ -56,68 +56,68 @@ public class TestAsynchronousValidationR
         mockContext = EasyMock.createMock(HttpContext.class);
         mockCacheEntry = EasyMock.createMock(HttpCacheEntry.class);
     }
-    
+
     @Test
     public void testRunCallsCachingClientAndRemovesIdentifier() throws ProtocolException, IOException {
         String identifier = "foo";
-        
+
         AsynchronousValidationRequest asynchRequest = new AsynchronousValidationRequest(
                 mockParent, mockClient, target, request, mockContext, mockCacheEntry,
                 identifier);
-     
+
         // response not used
         EasyMock.expect(mockClient.revalidateCacheEntry(target, request, mockContext, mockCacheEntry)).andReturn(null);
         mockParent.markComplete(identifier);
-        
+
         replayMocks();
         asynchRequest.run();
         verifyMocks();
     }
-    
+
     @Test
     public void testRunGracefullyHandlesProtocolException() throws IOException, ProtocolException {
         String identifier = "foo";
-        
+
         AsynchronousValidationRequest impl = new AsynchronousValidationRequest(
                 mockParent, mockClient, target, request, mockContext, mockCacheEntry,
                 identifier);
-     
+
         // response not used
         EasyMock.expect(
                 mockClient.revalidateCacheEntry(target, request, mockContext,
                         mockCacheEntry)).andThrow(new ProtocolException());
         mockParent.markComplete(identifier);
-        
+
         replayMocks();
         impl.run();
         verifyMocks();
     }
-    
+
     @Test
     public void testRunGracefullyHandlesIOException() throws IOException, ProtocolException {
         String identifier = "foo";
-        
+
         AsynchronousValidationRequest impl = new AsynchronousValidationRequest(
                 mockParent, mockClient, target, request, mockContext, mockCacheEntry,
                 identifier);
-     
+
         // response not used
         EasyMock.expect(
                 mockClient.revalidateCacheEntry(target, request, mockContext,
                         mockCacheEntry)).andThrow(new IOException());
         mockParent.markComplete(identifier);
-        
+
         replayMocks();
         impl.run();
         verifyMocks();
     }
-    
+
     public void replayMocks() {
         EasyMock.replay(mockClient);
         EasyMock.replay(mockContext);
         EasyMock.replay(mockCacheEntry);
     }
-    
+
     public void verifyMocks() {
         EasyMock.verify(mockClient);
         EasyMock.verify(mockContext);

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidator.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestAsynchronousValidator.java Sun Sep 18 16:20:20 2011
@@ -48,17 +48,17 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class TestAsynchronousValidator {
-    
+
     private AsynchronousValidator impl;
-    
+
     private CachingHttpClient mockClient;
     private HttpHost target;
     private HttpRequest request;
     private HttpContext mockContext;
     private HttpCacheEntry mockCacheEntry;
-    
+
     private ExecutorService mockExecutor;
-    
+
     @Before
     public void setUp() {
         mockClient = EasyMock.createMock(CachingHttpClient.class);
@@ -66,138 +66,138 @@ public class TestAsynchronousValidator {
         request = new HttpGet("/");
         mockContext = EasyMock.createMock(HttpContext.class);
         mockCacheEntry = EasyMock.createMock(HttpCacheEntry.class);
-        
+
         mockExecutor = EasyMock.createMock(ExecutorService.class);
-        
+
     }
-    
+
     @Test
     public void testRevalidateCacheEntrySchedulesExecutionAndPopulatesIdentifier() {
         impl = new AsynchronousValidator(mockClient, mockExecutor);
-        
+
         EasyMock.expect(mockCacheEntry.hasVariants()).andReturn(false);
         mockExecutor.execute(EasyMock.isA(AsynchronousValidationRequest.class));
-        
+
         replayMocks();
         impl.revalidateCacheEntry(target, request, mockContext, mockCacheEntry);
         verifyMocks();
-        
+
         Assert.assertEquals(1, impl.getScheduledIdentifiers().size());
     }
-    
+
     @Test
     public void testMarkCompleteRemovesIdentifier() {
         impl = new AsynchronousValidator(mockClient, mockExecutor);
-        
+
         EasyMock.expect(mockCacheEntry.hasVariants()).andReturn(false);
         Capture<AsynchronousValidationRequest> cap = new Capture<AsynchronousValidationRequest>();
         mockExecutor.execute(EasyMock.capture(cap));
-        
+
         replayMocks();
         impl.revalidateCacheEntry(target, request, mockContext, mockCacheEntry);
         verifyMocks();
-        
+
         Assert.assertEquals(1, impl.getScheduledIdentifiers().size());
-        
+
         impl.markComplete(cap.getValue().getIdentifier());
-        
+
         Assert.assertEquals(0, impl.getScheduledIdentifiers().size());
     }
-    
+
     @Test
     public void testRevalidateCacheEntryDoesNotPopulateIdentifierOnRejectedExecutionException() {
         impl = new AsynchronousValidator(mockClient, mockExecutor);
-        
+
         EasyMock.expect(mockCacheEntry.hasVariants()).andReturn(false);
         mockExecutor.execute(EasyMock.isA(AsynchronousValidationRequest.class));
         EasyMock.expectLastCall().andThrow(new RejectedExecutionException());
-        
+
         replayMocks();
         impl.revalidateCacheEntry(target, request, mockContext, mockCacheEntry);
         verifyMocks();
-        
+
         Assert.assertEquals(0, impl.getScheduledIdentifiers().size());
     }
-    
+
     @Test
     public void testRevalidateCacheEntryProperlyCollapsesRequest() {
         impl = new AsynchronousValidator(mockClient, mockExecutor);
-        
+
         EasyMock.expect(mockCacheEntry.hasVariants()).andReturn(false);
         mockExecutor.execute(EasyMock.isA(AsynchronousValidationRequest.class));
-        
+
         EasyMock.expect(mockCacheEntry.hasVariants()).andReturn(false);
-        
+
         replayMocks();
         impl.revalidateCacheEntry(target, request, mockContext, mockCacheEntry);
         impl.revalidateCacheEntry(target, request, mockContext, mockCacheEntry);
         verifyMocks();
-        
+
         Assert.assertEquals(1, impl.getScheduledIdentifiers().size());
     }
-    
+
     @Test
     public void testVariantsBothRevalidated() {
         impl = new AsynchronousValidator(mockClient, mockExecutor);
-        
+
         HttpRequest req1 = new HttpGet("/");
         req1.addHeader(new BasicHeader("Accept-Encoding", "identity"));
-        
+
         HttpRequest req2 = new HttpGet("/");
         req2.addHeader(new BasicHeader("Accept-Encoding", "gzip"));
-        
+
         Header[] variantHeaders = new Header[] {
                 new BasicHeader(HeaderConstants.VARY, "Accept-Encoding")
         };
-        
+
         EasyMock.expect(mockCacheEntry.hasVariants()).andReturn(true).times(2);
         EasyMock.expect(mockCacheEntry.getHeaders(HeaderConstants.VARY)).andReturn(variantHeaders).times(2);
         mockExecutor.execute(EasyMock.isA(AsynchronousValidationRequest.class));
         EasyMock.expectLastCall().times(2);
-        
+
         replayMocks();
         impl.revalidateCacheEntry(target, req1, mockContext, mockCacheEntry);
         impl.revalidateCacheEntry(target, req2, mockContext, mockCacheEntry);
         verifyMocks();
-        
+
         Assert.assertEquals(2, impl.getScheduledIdentifiers().size());
-        
+
     }
-    
+
     @Test
     public void testRevalidateCacheEntryEndToEnd() throws ProtocolException, IOException {
         CacheConfig config = new CacheConfig();
         config.setAsynchronousWorkersMax(1);
         config.setAsynchronousWorkersCore(1);
         impl = new AsynchronousValidator(mockClient, config);
-        
+
         EasyMock.expect(mockCacheEntry.hasVariants()).andReturn(false);
         EasyMock.expect(mockClient.revalidateCacheEntry(target, request, mockContext, mockCacheEntry)).andReturn(null);
-        
+
         replayMocks();
         impl.revalidateCacheEntry(target, request, mockContext, mockCacheEntry);
-        
+
         try {
             // shut down backend executor and make sure all finishes properly, 1 second should be sufficient
             ExecutorService implExecutor = impl.getExecutor();
             implExecutor.shutdown();
             implExecutor.awaitTermination(1, TimeUnit.SECONDS);
         } catch (InterruptedException ie) {
-            
+
         } finally {
             verifyMocks();
-            
+
             Assert.assertEquals(0, impl.getScheduledIdentifiers().size());
         }
     }
-    
+
     public void replayMocks() {
         EasyMock.replay(mockExecutor);
         EasyMock.replay(mockClient);
         EasyMock.replay(mockContext);
         EasyMock.replay(mockCacheEntry);
     }
-    
+
     public void verifyMocks() {
         EasyMock.verify(mockExecutor);
         EasyMock.verify(mockClient);

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCacheEntryUpdater.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCacheEntryUpdater.java?rev=1172301&r1=1172300&r2=1172301&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCacheEntryUpdater.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCacheEntryUpdater.java Sun Sep 18 16:20:20 2011
@@ -94,7 +94,7 @@ public class TestCacheEntryUpdater {
         HttpCacheEntry updatedEntry = impl.updateCacheEntry(null, entry,
                 new Date(), new Date(), response);
 
-         
+
         Header[] updatedHeaders = updatedEntry.getAllHeaders();
         assertEquals(2, updatedHeaders.length);
         headersContain(updatedHeaders, "Date", formatDate(responseDate));
@@ -159,7 +159,7 @@ public class TestCacheEntryUpdater {
                 new BasicHeader("Date", formatDate(oneSecondAgo)),
                 new BasicHeader("ETag", "\"new-etag\"")
         };
-        entry = HttpTestUtils.makeCacheEntry(twoSecondsAgo, now, headers); 
+        entry = HttpTestUtils.makeCacheEntry(twoSecondsAgo, now, headers);
         response.setHeader("Date", formatDate(tenSecondsAgo));
         response.setHeader("ETag", "\"old-etag\"");
         HttpCacheEntry result = impl.updateCacheEntry("A", entry, new Date(),
@@ -179,7 +179,7 @@ public class TestCacheEntryUpdater {
         assertEquals(twoSecondsAgo, updated.getRequestDate());
         assertEquals(oneSecondAgo, updated.getResponseDate());
     }
-    
+
     @Test
     public void entry1xxWarningsAreRemovedOnUpdate() throws Exception {
         Header[] headers = {
@@ -195,7 +195,7 @@ public class TestCacheEntryUpdater {
 
         assertEquals(0, updated.getHeaders("Warning").length);
     }
-    
+
     @Test
     public void entryWithMalformedDateIsStillUpdated() throws Exception {
         Header[] headers = {
@@ -225,7 +225,7 @@ public class TestCacheEntryUpdater {
 
         assertEquals("\"new\"", updated.getFirstHeader("ETag").getValue());
     }
-    
+
     @Test
     public void cannotUpdateFromANon304OriginResponse() throws Exception {
         entry = HttpTestUtils.makeCacheEntry();



Mime
View raw message