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

List:       xmlrpc-user
Subject:    [jira] [Resolved] (AXIOM-500) OMElement.serialize() doesn't release OutputStream
From:       "Andreas Veithen (Jira)" <jira () apache ! org>
Date:       2021-11-17 12:52:00
Message-ID: JIRA.13267707.1573565523000.29758.1637153520020 () Atlassian ! JIRA
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/AXIOM-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Andreas Veithen resolved AXIOM-500.
-----------------------------------
    Fix Version/s: 1.3.0
       Resolution: Fixed

I believe Axiom 1.3.0 actually fixes that because it no longer uses XMLStreamWriter \
in that code path.

> 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
> Fix For: 1.3.0
> 
> 
> 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.20.1#820001)

---------------------------------------------------------------------
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