[JSR_333-77] TraversingItemVisitor causes stackoverflowexception with breadth first traversal Created: 15/Jul/16  Updated: 15/Jul/16

Status: Open
Project: jsr-333
Component/s: api
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: chetan_oct Assignee: uncled
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


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.

Normal traversal (depth first) works fine

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

Comment by chetan_oct [ 15/Jul/16 ]

For possible testcase refer to https://issues.apache.org/jira/browse/OAK-4549

Generated at Sat Feb 25 06:24:07 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.