logo       

Re: Bug: Input Stream not closed in unparsed-text(): msg#00154

text.xml.saxon.help

Subject: Re: Bug: Input Stream not closed in unparsed-text()

Pier Fumagalli wrote:

>So, IMVHO, in this case "reader.close()" makes more sense than
>"is.close()".

I concur, of course. I confess my "fix" was merely a test for verifying
that not closing the basic InputStream was the actual problem I was seeing.

I'd like to add that the InputStream (!) needs probably be closed also in
the "catch (java.io.UnsupportedEncodingException encErr)" execution
branch (the IS has already been opened here and will only be closed at
garbage collection time if not closed explicitly). Rewriting the code a
little (maybe using "finally") should do it.

Regards, Christian.




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise