You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2008/04/28 19:43:55 UTC
[jira] Updated: (WSCOMMONS-334) OMSourcedElementImpl#serialize
produces wrong result when element is expanded
[ https://issues.apache.org/jira/browse/WSCOMMONS-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen updated WSCOMMONS-334:
--------------------------------------
Attachment: WSCOMMONS-334.patch.txt
Attached patch which also solves an identical problem in toString.
> 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
> 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.