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

Avoid exists check in NodeDelegate.getChild() with empty path

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.11
    • jcr
    • None

    Description

      This is a minor optmization when relPath in NodeDelegate.getChild() is the empty path. In this case there is no need to get the tree, check existence and wrap it with a NodeDelegate. The method can just return this.

      Most of the time relPath is not empty, but it can still happen quite frequently because Node.addNode() is usually called with a name only.

      Attachments

        Activity

          People

            mreutegg Marcel Reutegger
            mreutegg Marcel Reutegger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: