[dna-issues] [JBoss JIRA] Created: (DNA-287) AbstractJcrNode.getAncestor Does Not Match JCR 1.0 Specification

Brian Carothers (JIRA) jira-events at lists.jboss.org
Tue Mar 3 10:33:22 EST 2009


AbstractJcrNode.getAncestor Does Not Match JCR 1.0 Specification
----------------------------------------------------------------

                 Key: DNA-287
                 URL: https://jira.jboss.org/jira/browse/DNA-287
             Project: DNA
          Issue Type: Bug
          Components: JCR
    Affects Versions: 0.4
            Reporter: Brian Carothers
         Attachments: DNA-287.patch

AbstractJcrNode.getDepth(int depth) treats depth parameter as a relative depth.  That is, getDepth(0) returns the current node.  According to spec, getDepth(0) should return the root node and getDepth(n) should return the current node if the current node's depth is n.

Also, the spec indicates that the method should throw an ItemNotFoundException if the depth parameter is negative.  The current code throws an IllegalArgumentException.

Fixing this behavior allows a few more TCK tests to pass.

-- 
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