[prev in list] [next in list] [prev in thread] [next in thread] 

List:       woden-dev
Subject:    [jira] [Created] (AXIOM-500) OMElement.serialize() doesn't release OutputStream
From:       "Holger Rehn (Jira)" <jira () apache ! org>
Date:       2019-11-12 13:33:00
Message-ID: JIRA.13267707.1573565523000.134781.1573565580044 () Atlassian ! JIRA
[Download RAW message or body]

Holger Rehn created AXIOM-500:
---------------------------------

             Summary: OMElement.serialize() doesn't release OutputStream
                 Key: AXIOM-500
                 URL: https://issues.apache.org/jira/browse/AXIOM-500
             Project: Axiom
          Issue Type: Bug
    Affects Versions: 1.2.22
            Reporter: Holger Rehn


After=C2=A0OMElement.serialize(OutputStream) returns, the provided stream i=
s still referenced via

StAXUtils->SynchronizedMap->WeakHashMap->ImmutableXMLOutputFactory->SJSXPOu=
tputFactoryWrapper->XMLOutputFactoryImpl->XMLStreamWriterImpl

I think the root cause is, that=C2=A0MTOMXMLStreamWriter.close() doesn't cl=
ose its=C2=A0XMLStreamWriter instance. The comment in close() states that c=
losing 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 r=
eleased somehow.

My current workaround is to use=C2=A0OMElement.serialize(StAXUtils.createXM=
LStreamWriter(out)) and explicitly close the writer myself.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic