Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-2665

JCR Test for Adding Node Type Tests That Abstract Nodes Can Be Added as Children, contrary to JCR 2.0 specification

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1
    • 2.2
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            bcarothers Brian Carothers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: