ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AXIOM-429) The result of OMContainer#addChild should not depend on the state (completeness) of the parent
Date Sat, 30 Jun 2012 09:29:44 GMT
Andreas Veithen created AXIOM-429:
-------------------------------------

             Summary: The result of OMContainer#addChild should not depend on the state (completeness)
of the parent
                 Key: AXIOM-429
                 URL: https://issues.apache.org/jira/browse/AXIOM-429
             Project: Axiom
          Issue Type: Bug
          Components: DOOM, LLOM
    Affects Versions: 1.2.13
            Reporter: Andreas Veithen
            Assignee: Andreas Veithen
             Fix For: 1.2.14


Deferred parsing should be transparent to application code and the result (in terms of the
content of the resulting document) of an operation on an Axiom tree should not depend on whether
the tree is completely built or not. For OMContainer#addChild, this means that the new child
should always be added as the last child. This implies that if the parent is not complete,
it must be built first. In Axiom 1.2.13 this is not the case and addChild may insert the new
child at an unexpected location. This can be demonstrated with the following simple code:

OMElement parent = OMXMLBuilderFactory.createOMBuilder(new StringReader("<root><a/><b/></root>")).getDocumentElement();
parent.addChild(factory.createOMElement("c", null));

The resulting document would be <root><c/><a/><b/></root> instead
of the expected <root><a/><b/><c/></root>.

Fixing this requires some larger changes because the addChild method is also used (directly
or indirectly) by the builder (which expects that the new child is added after the last built
child).


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message