DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5079>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5079

Closing InputStreams/Readers

           Summary: Closing InputStreams/Readers
           Product: Xerces2-J
           Version: 2.0.0 [beta 2]
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XNI
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


With org.apache.xerces.xni.parser.XMLPullParserConfiguration, an
application may choose not to parse a document completely.  At the
point where it stops passing multiple external entities may be open.
There doesn't seem to be any way for the application to make the
parser release the resources consumed by those open entities (e.g. by
closing the Reader or InputStream).  I would suggest that
XMLPullParserConfiguration needs a close() method to do this.

Whilst looking at this problem, I noticed that Xerces does not
currently appear to close all the InputStreams/Readers that it opens.
AbstractSAXParser.parse(String) has some code to close the
InputStream/Reader, but this looks very fishy: XMLReader.parse(String
s) should be equivalent to parse(new InputSource(systemId)), but it's
not in respect of closing.  Surely this should be dealt with an the
XNI level not the SAX level.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to