[dna-issues] [JBoss JIRA] Created: (DNA-407) ReadBranchRequest.iterator() returns too many nodes

Randall Hauch (JIRA) jira-events at lists.jboss.org
Thu May 14 10:22:47 EDT 2009


ReadBranchRequest.iterator() returns too many nodes
---------------------------------------------------

                 Key: DNA-407
                 URL: https://jira.jboss.org/jira/browse/DNA-407
             Project: DNA
          Issue Type: Bug
          Components: Connectors, Graph
    Affects Versions: 0.4
            Reporter: Randall Hauch
            Assignee: Randall Hauch
             Fix For: 0.5


The ReadBranchRequest.iterator() method returns an iterator that walks (in pre-order traversal) the nodes that were set as results on the request.  The iterator is to walk all the nodes in the branch and should not include the children of the bottom nodes in the branch.  However, this is what the iterator is currently doing.

For example, consider a graph in a repository:
  A
  +- B
  |    +- C
  +- D

If the ReadRequestBranch is submitted with a path of '/A' and maximum depth of 2, then the branch should include all the properties and children for nodes A, B and D.  Node C should not be included in the branch because it is below the maximum depth.  The current implementation of the iterator is also returning node C; not only is this wrong, but it also generates an NPE when iterating.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the dna-issues mailing list