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

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


     [ https://jira.jboss.org/jira/browse/DNA-287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Carothers updated DNA-287:
--------------------------------

    Attachment: DNA-287.patch


The property implementation had the same issue.  This patch also corrects getAncestor behavior for properties by hoisting the correct implementation into AbstractJcrItem and removing the node- and property-specific getDepth and getAncestor implementations.

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