You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Vladimir Orlov (JIRA)" <ji...@apache.org> on 2010/03/03 21:06:27 UTC

[jira] Reopened: (JXPATH-134) NodeIterator usage in AttributeContext

     [ https://issues.apache.org/jira/browse/JXPATH-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Orlov reopened JXPATH-134:
-----------------------------------


> NodeIterator usage in AttributeContext
> --------------------------------------
>
>                 Key: JXPATH-134
>                 URL: https://issues.apache.org/jira/browse/JXPATH-134
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: JDK 1.5.0_12
>            Reporter: Vladimir Orlov
>
> There is the following piece of code in AttributeContext class, nextNode() method:
>         if (!iterator.setPosition(iterator.getPosition() + 1)) {
>             return false;
>         }
> It implies that the following precondition is satisfied in the NodeIterator implementation: in its initial state NodeIterator implementation has the position set in 0 when the first position index is actually 1. At the same time NodeIterator interface implies that the client code should call the setPosition() method of the NodeIterator first and only after that it can call the getPosition()  or getNodePointer(). There is no any information about such a strange condition to satisfy for the NodeIterator implementation in the Javadoc.

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