hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1570963 - in /httpcomponents/httpclient/trunk: RELEASE_NOTES.txt httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestRFC5861Compliance.java
Date Sun, 23 Feb 2014 03:05:06 GMT
Author: sebb
Date: Sun Feb 23 03:05:04 2014
New Revision: 1570963

URL: http://svn.apache.org/r1570963
Log:
HTTPCLIENT-1470 CachingExec(ClientExecChain, HttpCache, CacheConfig, AsynchronousValidator)
throws NPE if config is null

Modified:
    httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
    httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestRFC5861Compliance.java

Modified: httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?rev=1570963&r1=1570962&r2=1570963&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Sun Feb 23 03:05:04 2014
@@ -4,6 +4,8 @@ Changes for 4.4-alpha1
 Changelog:
 -------------------
 
+* [HTTPCLIENT-1470] CachingExec(ClientExecChain, HttpCache, CacheConfig, AsynchronousValidator)
throws NPE if config is null
+
 * [HTTPCLIENT-1466] FileBodyPart#generateContentType() ignores custom ContentType values.
   Contributed by Oleg Kalnichevski <olegk at apache.org>
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java?rev=1570963&r1=1570962&r2=1570963&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
Sun Feb 23 03:05:04 2014
@@ -136,10 +136,10 @@ public class CachingExec implements Clie
         this.validityPolicy = new CacheValidityPolicy();
         this.responseGenerator = new CachedHttpResponseGenerator(this.validityPolicy);
         this.cacheableRequestPolicy = new CacheableRequestPolicy();
-        this.suitabilityChecker = new CachedResponseSuitabilityChecker(this.validityPolicy,
config);
+        this.suitabilityChecker = new CachedResponseSuitabilityChecker(this.validityPolicy,
this.cacheConfig);
         this.conditionalRequestBuilder = new ConditionalRequestBuilder();
         this.responseCompliance = new ResponseProtocolCompliance();
-        this.requestCompliance = new RequestProtocolCompliance(config.isWeakETagOnPutDeleteAllowed());
+        this.requestCompliance = new RequestProtocolCompliance(this.cacheConfig.isWeakETagOnPutDeleteAllowed());
         this.responseCachingPolicy = new ResponseCachingPolicy(
                 this.cacheConfig.getMaxObjectSize(), this.cacheConfig.isSharedCache(),
                 this.cacheConfig.isNeverCacheHTTP10ResponsesWithQuery(), this.cacheConfig.is303CachingEnabled());

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestRFC5861Compliance.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestRFC5861Compliance.java?rev=1570963&r1=1570962&r2=1570963&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestRFC5861Compliance.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestRFC5861Compliance.java
Sun Feb 23 03:05:04 2014
@@ -367,6 +367,11 @@ public class TestRFC5861Compliance exten
     }
 
     @Test
+    public void testHTTPCLIENT1470() {
+        impl = new CachingExec(mockBackend, cache, null, new AsynchronousValidator(config));
+    }
+
+    @Test
     public void testStaleWhileRevalidateReturnsStaleNonRevalidatableEntryWithWarning()
         throws Exception {
         config = CacheConfig.custom().setMaxCacheEntries(MAX_ENTRIES).setMaxObjectSize(MAX_BYTES)



Mime
View raw message