Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-998

Node#orderBefore() is not JCR conform

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8
    • 0.9
    • jcr
    • None

    Description

      In case you call node.orderBefore("nodeName", "nodeName"), oak throws
      IllegalArgumentException with message "limit is negative"

      While you may reason that is a wrong useage the spec is explicit about the expected behavior.

      If this node supports child node ordering, this method inserts the child node at srcChildRelPath into the child node list at the position immediately the child node at destChildRelPath.
      
      To place the node srcChildRelPath at the end of the list, a destChildRelPath of null is used.
      
      Note that (apart from the case where destChildRelPath is null) both of these arguments must be relative paths of depth one, in other words they are the names of the child nodes, possibly suffixed with an index.
      
      If srcChildRelPath and destChildRelPath are the same, then no change is made.
      
      This is session-write method, meaning that a change made by this method is dispatched on save

      Attachments

        Activity

          People

            angela Angela Schreiber
            chkeller Christan Keller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: