You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Holger Rehn (Jira)" <ji...@apache.org> on 2019/11/12 13:33:00 UTC
[jira] [Updated] (AXIOM-500) OMElement.serialize() doesn't release
OutputStream
[ https://issues.apache.org/jira/browse/AXIOM-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Holger Rehn updated AXIOM-500:
------------------------------
Priority: Critical (was: Major)
> 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
> Priority: Critical
>
> After OMElement.serialize(OutputStream) returns, the provided stream is still referenced via
> StAXUtils->SynchronizedMap->WeakHashMap->ImmutableXMLOutputFactory->SJSXPOutputFactoryWrapper->XMLOutputFactoryImpl->XMLStreamWriterImpl
> 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
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org