[
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