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

ItemImpl#validateTransientItems: Incomplete validation of mandatory child item

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0-beta1
    • jackrabbit-core
    • None

    Description

      ItemImpl#validateTransientItems iterates over all mandatory child node/property definitions in order to assert that those items have
      been created. However, it only checks if an item with the name defined by the mandatory item definition is present and not if that
      existing item really has the mandatory definition.

      the example i had:

      • mandatory single-value property.
      • there is the possibility to add residual props
      • added a residual property with the name of the mandatory prop but with multiple values

      -> changes are saved without exception.
      -> the node doesn't have a property with the mandatory definition.

      ((without having tried it out, i think the same would be possible with child nodes))

      suggested fix:
      if there is a child item with the mandatory-item-name -> make sure it's definition is mandatory (or the expected one...)
      patch will follow.

      Attachments

        1. JCR_2333.patch
          8 kB
          Angela Schreiber
        2. JCR-2333_2.patch
          8 kB
          Angela Schreiber

        Activity

          People

            angela Angela Schreiber
            angela Angela Schreiber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: