[
https://issues.apache.org/jira/browse/SLING-3765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14065501#comment-14065501
]
Robert Munteanu commented on SLING-3765:
----------------------------------------
I've narrowed down the problem. The current approach when reordering nodes is
to reorder once, then resume the reordering process. The assumption is that the
child nodes will be re-read and then the processing will continue with the next
one. This was a vestige of the old reordering method, and is clearly incorrect.
The reason is that the {{Node.orderBefore}} method requires a {{Session.save}}
is order to take effect. Since the initial reorder seemingly does not have any
effect, it will be attempted over and over again, leading to the
StackOverFlowError.
> Sorting node children can trigger a StackOverFlowError
> ------------------------------------------------------
>
> Key: SLING-3765
> URL: https://issues.apache.org/jira/browse/SLING-3765
> Project: Sling
> Issue Type: Bug
> Components: IDE
> Reporter: Robert Munteanu
> Assignee: Robert Munteanu
> Fix For: Sling Eclipse IDE 1.0.2
>
> Attachments: screenshot.png, trace-log-snippet.txt
>
>
> Under certain circumstances it is possible for the reordering operation to
> not succeed and attempt _ad infinitum_ to perform the same reorder operation.
> There is probably an error in the ordering logic which needs to be fixed.
--
This message was sent by Atlassian JIRA
(v6.2#6252)