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

TraversingItemVisitor causes stackoverflowexception with breadth first traversal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • jackrabbit-jcr-commons
    • 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

              Unassigned Unassigned
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: