You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2010/12/30 15:04:48 UTC

[jira] Commented: (AXIOM-24) OMDocument#serializeAndConsume doesn't consume the document

    [ https://issues.apache.org/jira/browse/AXIOM-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976041#action_12976041 ] 

Hudson commented on AXIOM-24:
-----------------------------

Integrated in ws-axiom-trunk #300 (See [https://hudson.apache.org/hudson/job/ws-axiom-trunk/300/])
    Added two new test cases for OMContainer#serializeAndConsume. They will be necessary to ensure non regression when implementing AXIOM-24. In addition, they reveal problems in DOOM which may be related to AXIOM-315.


> OMDocument#serializeAndConsume doesn't consume the document
> -----------------------------------------------------------
>
>                 Key: AXIOM-24
>                 URL: https://issues.apache.org/jira/browse/AXIOM-24
>             Project: Axiom
>          Issue Type: Bug
>          Components: DOOM, LLOM
>    Affects Versions: 1.2.8
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.2.11
>
>
> OMDocument#serializeAndConsume doesn't consume the document but instead fully builds it.
> This is caused by the following piece of code:
>             while (children.hasNext()) {
>                 OMNodeEx omNode = (OMNodeEx) children.next();
>                 omNode.internalSerializeAndConsume(writer);
>             }
> As described in WSCOMMONS-346, the call to Iterator#next() actually builds the returned node, so that the call to internalSerializeAndConsume has the same effect as serialization with caching enabled. This means that the code fully builds the document.
> Note that the code actually doesn't make sense because once a child (in particular the document element) has been consumed, it is not possible to retrieve the next sibling. This means that even if WSCOMMONS-346 is solved, the code still wouldn't behave as expected. Worse, it would trigger an exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org