Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D06B105D1 for ; Mon, 7 Oct 2013 23:50:43 +0000 (UTC) Received: (qmail 15530 invoked by uid 500); 7 Oct 2013 23:50:43 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 15453 invoked by uid 500); 7 Oct 2013 23:50:43 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 15367 invoked by uid 99); 7 Oct 2013 23:50:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Oct 2013 23:50:42 +0000 Date: Mon, 7 Oct 2013 23:50:42 +0000 (UTC) From: "kyle leonhard (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCLIENT-1416) CachingHttpClientBuilder.create().build() throws NPE with default configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788725#comment-13788725 ] kyle leonhard commented on HTTPCLIENT-1416: ------------------------------------------- Changes look fine to me. > 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.(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