hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1529812 - in /httpcomponents/httpclient/trunk: ./ httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ httpclient-cache/src/test/java/org/apache/http/impl/client/cache/
Date Mon, 07 Oct 2013 10:08:06 GMT
Author: olegk
Date: Mon Oct  7 10:08:05 2013
New Revision: 1529812

URL: http://svn.apache.org/r1529812
Log:
HTTPCLIENT-1416: Fixed NPE in CachingHttpClientBuilder#build()

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

Modified: httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?rev=1529812&r1=1529811&r2=1529812&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Mon Oct  7 10:08:05 2013
@@ -1,3 +1,11 @@
+Changes sicne 4.3.1
+-------------------
+
+* [HTTPCLIENT-1416] Fixed NPE in CachingHttpClientBuilder#build().
+  Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+
+
 Release 4.3.1
 -------------------
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClientBuilder.java?rev=1529812&r1=1529811&r2=1529812&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClientBuilder.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClientBuilder.java
Mon Oct  7 10:08:05 2013
@@ -107,9 +107,9 @@ public class CachingHttpClientBuilder ex
         HttpCacheStorage storage = this.storage;
         if (storage == null) {
             if (this.cacheDir == null) {
-                storage = new BasicHttpCacheStorage(cacheConfig);
+                storage = new BasicHttpCacheStorage(config);
             } else {
-                final ManagedHttpCacheStorage managedStorage = new ManagedHttpCacheStorage(cacheConfig);
+                final ManagedHttpCacheStorage managedStorage = new ManagedHttpCacheStorage(config);
                 addCloseable(managedStorage);
                 storage = managedStorage;
             }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachingHttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachingHttpClientBuilder.java?rev=1529812&r1=1529811&r2=1529812&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachingHttpClientBuilder.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/TestCachingHttpClientBuilder.java
Mon Oct  7 10:08:05 2013
@@ -40,4 +40,9 @@ public class TestCachingHttpClientBuilde
         CachingHttpClientBuilder.create().setCacheConfig(cacheConfig).build();
     }
 
+    @Test
+    public void testNullCacheConfig() throws Exception {
+        CachingHttpClientBuilder.create().setCacheConfig(null).build();
+    }
+
 }



Mime
View raw message