XMLUtils can cause an unclosed XMLStreamReader
----------------------------------------------

                 Key: AXIS2-3137
                 URL: https://issues.apache.org/jira/browse/AXIS2-3137
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: kernel
            Reporter: Rich Scheuerle
            Assignee: Rich Scheuerle
            Priority: Minor


XMLUtils provides a toOM(Element), toOM(InputStream) and toOM(Reader) utilities.

These utilities create an OMElement that is sourced by the input parameter.

Problem Description:
The current code does not build() the entire OMElement.  Instead the caller 
must build() the element and be responsible for closing the builder/parser.
These utilities are currently only used for reading deployment files (they are 
not used for actual message processing).
In several cases, the calling code does not close the builder/parser, this 
results in open parsers and memory footprint problems.

Problem Solution:
I am changing each of these methods to build() the OMElement and close the 
parser.
In addition, I adding 3 new methods toOM(Element, boolean buildAll), 
toOM(InputStream, boolean buildAll) and toOM(Reader, buildAll).
These new methods give the calling code the ability to build or not build the 
OMElement.

This solution is a joint contribution between Mike Rheinheimer and Rich 
Scheuerle.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to