Leif Mortenson wrote:

Vadim Gritsenko wrote:

Leif Mortenson wrote:

I committed a modified patch to SVN as well as went through and added javadocs to
the relevant interfaces making it more obvious that these streams need to be closed by the
calling code. Could you take a look at the changes and post back if you see any problems.


There are couple of issues... You are loosing original IOException in lines 520, 533, 539:
520: modDestination.cancel( out );
533: out.close();
539: in.close();
If an IOException has been thrown already, any new IOException which can happen in these lines will cause original IOException to get lost.


Worst case scenario, you are loosing 3 IOExceptions and showing only the very last, fourth one. My gut feeling tells me the very first one usually way more informative than the fourth one.

I guess, ideally, you would preserve original exception in all glory, and add messages from all of the following exceptions if you don't want to ignore them:
message += "and on top of that, you've got " + e;


Good point, I was more concerned with being careful that all streams are always closed
appropriately. It now keeps track of the first exception thrown and wraps that in a
SourceException. Thanks for pointing that out.

Thanks, that's better :-)


PS What's the current release of excalibur-sourceresolve? And when's next one? http://www.apache.org/dist/excalibur/ is empty. There is stuff under http://www.apache.org/dist/avalon/ though.


Vadim


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Apache Excalibur Project -- URL: http://excalibur.apache.org/



Reply via email to