Stefan E. Funk created CXF-4267:
-----------------------------------
Summary: 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
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