On Wednesday, April 25, 2012 04:36:46 AM Stefan Funk wrote:
> Found a bug?
> 
> If I do a realease 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 an exception... would that be to
> catch in the AttachmentDataSource class?

I guess a n NPE guard there would be OK.   Feel free to file a bug.  That 
said, the release() call is really meant to only be paired with a hold() 
call that would make sure the cache is there.   If hold() wasn't called, 
then release doesn't really make sense.

Dan


> Stefan.
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Caching-MTOM-attachments-and-working-with
> -cached-DataHandler-tp5529487p5664591.html Sent from the cxf-user mailing
> list archive at Nabble.com.
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to