jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Carothers (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-2665) JCR Test for Adding Node Type Tests That Abstract Nodes Can Be Added as Children, contrary to JCR 2.0 specification
Date Sun, 20 Jun 2010 15:23:23 GMT
JCR Test for Adding Node Type Tests That Abstract Nodes Can Be Added as Children, contrary
to JCR 2.0 specification
-------------------------------------------------------------------------------------------------------------------

                 Key: JCR-2665
                 URL: https://issues.apache.org/jira/browse/JCR-2665
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-jcr-tests, JCR 2.0
    Affects Versions: 2.1.0
            Reporter: Brian Carothers
            Priority: Minor


When the TCK test method testLegalAndResidualType in the CanAddChildNodeCallWithNodeTypeTest
class picks a node with a residual type, it does not filter out abstract nodes.  For example,
in my local test, nt:hierarchyNode is selected for the local variable 'type'.

Since abstract node types "cannot be directly assigned to a node,"[1] canAddChildNode(anyPropertyName,
"nt:hierarchyNode") must return false.  However, since the test assumes that a non-abstract
node type was chosen, it expects canAddChildNode(String, String) to return true.

This could be fixed if NodeTypeUtil.locateChildNodeDef(...) were extended to add an extra
argument allowing or disallowing abstract types and that extra argument was used to filter
the type used in testLegalAndResidualType (or if locateChildNodeDef(...) automatically excluded
abstract types in the same manner that it automatically excludes protected types).

[1] - Section 3.7.1.3 of the JCR2 specification

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


Mime
View raw message