Updated: (XERCESJ-1178) Error getting prefix for an attribute with no nam 2006-08-23 - By hua lei (JIRA)
[ http://issues.apache.org/jira/browse/XERCESJ-1178?page=all ]
hua lei updated XERCESJ-1178: -----------------------------
Attachment: stax_patch_8.23.zip
>In my test code I wasn't calling the close() method so it was this >last case that was the issue. While I agree that applications should >be calling this method they don't have to and if they drop all >references to the XMLStreamReader, it and all of its internals should >get garbage collected. If the XMLStreamReader gets garbage collected >without the AsyncSAXParser thread being terminated it will cause a >memory leak because the thread can't be garabage collected until it >terminates. A finalize() method should be added to the XMLStreamReader >to make sure that the thread gets terminated.
A finalize() method is added to the SAXXMLStreamReader to teminate the AsyncSAXParser thread.
>All namespace-aware parsers must check this condition [1]. If they >don't its a bug. In what case are you seeing this behaviour?
According to my tests, both xerces and crimson cann't recognize this case.
> Error getting prefix for an attribute with no namespace > ------------------------------------------------------- > > Key: XERCESJ-1178 > URL: http://issues.apache.org/jira/browse/XERCESJ-1178 > Project: Xerces2-J > Issue Type: Bug > Components: StAX > Affects Versions: 2.8.0 > Reporter: Lucian Holland > Assigned To: Michael Glavassevich > Attachments: stax_patch_8.19.zip, stax_patch_8.20.zip, stax_patch_8 .23.zip > > > The initialElementAttrs() method of SAXXMLStreamReader sets the prefix of attributes to null if it finds no colon in the attribute name; the problem with this is that getAttributeNamespace() uses this prefix when looking up the namespace uri with a call to getNamespaceURI on the NamespaceContextImpl, and this method throws an IllegalArgumentException if null is passed in.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http:/ /issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscribe@(protected) For additional commands, e-mail: j-dev-help@(protected)
|
|