Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70D2BC2FD for ; Thu, 26 Apr 2012 16:58:43 +0000 (UTC) Received: (qmail 92381 invoked by uid 500); 26 Apr 2012 16:58:42 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 92346 invoked by uid 500); 26 Apr 2012 16:58:42 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 92285 invoked by uid 99); 26 Apr 2012 16:58:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 16:58:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 16:58:38 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E292E410655 for ; Thu, 26 Apr 2012 16:58:17 +0000 (UTC) Date: Thu, 26 Apr 2012 16:58:17 +0000 (UTC) From: "Daniel Kulp (JIRA)" To: issues@cxf.apache.org Message-ID: <661088320.5792.1335459497938.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1518530800.4478.1335430572408.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (CXF-4267) A NPE in AttatchmentDataSource could be guarded. 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/CXF-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp resolved CXF-4267. ------------------------------ Resolution: Fixed Fix Version/s: 2.3.11 2.4.8 2.5.4 2.6.1 > A NPE in AttatchmentDataSource could be guarded. > ------------------------------------------------ > > Key: CXF-4267 > URL: https://issues.apache.org/jira/browse/CXF-4267 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Affects Versions: 2.5.2 > Reporter: Stefan E. Funk > Assignee: Daniel Kulp > Priority: Trivial > Fix For: 2.6.1, 2.5.4, 2.4.8, 2.3.11 > > > If I do a release a hold on a DataSource like this: > void release(DataSource ds) throws IOException { > AttachmentDataSource ads = getAttachmentDataSource(ds); > if (ads != null) { > // tell attachment to hold the temporary file; > ads.release(); > } > } > and the ads.isCached() is false, I get a NPE. I know that without a hold() there should be no release(), but sometimes it may happen anyway (e.g. in finally blocks), and then it would not be necesarry to check isCahced() before. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira