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

TraversingItemVisitor causes stackoverflowexception with breadth first traversal

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: jackrabbit-jcr-commons
    • Labels:
      None

      Description

      TraversingItemVisitor when used in breadth first traversal mode can lead to StackOverflowException with very flat child list. This happens because it uses recursion [1] instead of plain iteration which would increase the stack size proportional to number of immediate child node.

      The code technically belong to JSR-283 project. For now creating the issue here

      [1] https://java.net/projects/jsr-283/sources/svn/content/trunk/src/java/javax/jcr/util/TraversingItemVisitor.java?rev=967

        Attachments

        1. OAK-4549-test.patch
          2 kB
          Chetan Mehrotra

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chetanm Chetan Mehrotra
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: