[
https://issues.apache.org/jira/browse/WSCOMMONS-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Veithen resolved WSCOMMONS-334.
---------------------------------------
Resolution: Fixed
Fixed in trunk.
> OMSourcedElementImpl#serialize produces wrong result when element is expanded
> -----------------------------------------------------------------------------
>
> Key: WSCOMMONS-334
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-334
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Andreas Veithen
> Assignee: Andreas Veithen
> Fix For: Axiom 1.2.8
>
> Attachments: WSCOMMONS-334.patch.txt
>
>
> For OMSourcedElementImpl objects backed by OMDataSourceExt instances with
> destructiveWrite==false, the methods serialize(OutputStream, OMOutputFormat)
> and serialize(Writer, OMOutputFormat) produce the wrong result if the element
> has been modified. Indeed the code looks like this:
> public void serialize(OutputStream output, OMOutputFormat format) throws
> XMLStreamException {
> if (isDestructiveWrite()) {
> forceExpand();
> super.serialize(output, format);
> } else {
> dataSource.serialize(output, format);
> }
> }
> In the situation described here, this code will always call
> OMDataSourceExt#serialize even if the element has been modified. It should
> check the result of isExpanded() and always call super.serialize if the
> result is true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.