You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2012/04/26 17:18:17 UTC

[jira] [Assigned] (CXF-4267) A NPE in AttatchmentDataSource could be guarded.

     [ https://issues.apache.org/jira/browse/CXF-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-4267:
--------------------------------

    Assignee: Daniel Kulp
    
> 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
>
> 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