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 01:26:55 UTC

[jira] Created: (WSCOMMONS-334) OMSourcedElementImpl#serialize produces wrong result when element is expanded

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


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.


[jira] Updated: (WSCOMMONS-334) OMSourcedElementImpl#serialize produces wrong result when element is expanded

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Assigned: (WSCOMMONS-334) OMSourcedElementImpl#serialize produces wrong result when element is expanded

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned WSCOMMONS-334:
-----------------------------------------

    Assignee: Andreas Veithen

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


[jira] Updated: (WSCOMMONS-334) OMSourcedElementImpl#serialize produces wrong result when element is expanded

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated WSCOMMONS-334:
--------------------------------------

    Fix Version/s: Axiom 1.2.8

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


[jira] Resolved: (WSCOMMONS-334) OMSourcedElementImpl#serialize produces wrong result when element is expanded

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ 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.