[
https://issues.apache.org/jira/browse/AXIOM-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15049245#comment-15049245
]
Hudson commented on AXIOM-476:
------------------------------
SUCCESS: Integrated in axiom-trunk #2386 (See
[https://builds.apache.org/job/axiom-trunk/2386/])
AXIOM-476: Fix a problem in AbstractNodeIterator that causes a misbehavior in
Axiom's getDescendants method when used with includeSelf=true on an OMDocument.
(veithen: rev 1718935)
* axiom
*
axiom/aspects/core-aspects/src/main/java/org/apache/axiom/core/AbstractNodeIterator.java
* axiom/aspects/core-aspects/src/main/java/org/apache/axiom/core/Semantics.java
* axiom/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMSemantics.java
* axiom/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/FOMSemantics.java
*
axiom/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomSemantics.java
*
axiom/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
*
axiom/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetDescendants.java
> Descendant-or-self starting at document node fails to reach elements
> --------------------------------------------------------------------
>
> Key: AXIOM-476
> URL: https://issues.apache.org/jira/browse/AXIOM-476
> Project: Axiom
> Issue Type: Bug
> Components: Core Model
> Affects Versions: 1.2.16
> Environment: Mac OS X
> Reporter: Michael Kay
>
> The iterator obtained by OMDocument.getDescendants(true) returns the document
> node itself, and no further nodes. The problem is new in 1.2.16, and causes
> Saxon's XPath processor to deliver incorrect results when running against an
> Axiom document. The problem appears to be in AbstractNodeIterator, which is
> apparently new in 1.2.16. The problem is demonstrated by the following test
> case:
> public void testDescendantAxis() {
> OMFactory factory = OMAbstractFactory.getOMFactory();
> OMDocument document = factory.createOMDocument();
> OMElement element = factory.createOMElement("test", null);
> document.setOMDocumentElement(element);
> Iterator iter = document.getDescendants(true);
> int count = 0;
> while (iter.hasNext()) {
> Object o = iter.next();
> count++;
> }
> assertEquals("Two nodes", 2, count);
> System.err.println(count);
> }
> Running in the debugger, the document node is returned OK, but the iterator
> is left in a state where the following call on hasNext() returns false.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]