You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "kyle leonhard (JIRA)" <ji...@apache.org> on 2013/10/08 01:44:42 UTC

[jira] [Commented] (HTTPCLIENT-1416) CachingHttpClientBuilder.create().build() throws NPE with default configuration

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788717#comment-13788717 ] 

kyle leonhard commented on HTTPCLIENT-1416:
-------------------------------------------

Where can I find the subversion repo?

> CachingHttpClientBuilder.create().build() throws NPE with default configuration
> -------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1416
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1416
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpCache
>    Affects Versions: 4.3 Final
>            Reporter: kyle leonhard
>             Fix For: 4.3.2
>
>
> On build CachingHttpClientBuilder ends up calling CachingHttpClientBuilder.decorateMainExec which passes a null CacheConfig to the BasicHttpCacheStorage constructor causing a NPE.
> java.lang.NullPointerException
> 	at org.apache.http.impl.client.cache.BasicHttpCacheStorage.<init>(BasicHttpCacheStorage.java:53)
> 	at org.apache.http.impl.client.cache.CachingHttpClientBuilder.decorateMainExec(CachingHttpClientBuilder.java:110)
> 	at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:780)
> **Relevant code from CachingHttpClientBuilder.decorateMainExec
> final CacheConfig config = this.cacheConfig != null ? this.cacheConfig : CacheConfig.DEFAULT;
> .
> .
> .
> storage = new BasicHttpCacheStorage(cacheConfig);



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org