ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holger Rehn (Jira)" <>
Subject [jira] [Created] (AXIOM-500) OMElement.serialize() doesn't release OutputStream
Date Tue, 12 Nov 2019 13:33:00 GMT
Holger Rehn created AXIOM-500:

             Summary: OMElement.serialize() doesn't release OutputStream
                 Key: AXIOM-500
             Project: Axiom
          Issue Type: Bug
    Affects Versions: 1.2.22
            Reporter: Holger Rehn

After OMElement.serialize(OutputStream) returns, the provided stream is still referenced


I think the root cause is, that MTOMXMLStreamWriter.close() doesn't close its XMLStreamWriter
instance. The comment in close() states that closing the underlying XMLStreamWriter could
cause an exception, but I don't see how this could happen. Anyway, the reference to the stream
has to be released somehow.

My current workaround is to use OMElement.serialize(StAXUtils.createXMLStreamWriter(out))
and explicitly close the writer myself.

This message was sent by Atlassian Jira

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message