Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
2.5.2
-
None
Description
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)
}
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.