forked from marktriggs/nla-browse-handler
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove recursion in implementation of
Leech.next()
(#47)
If you have an index with deleted records, a call to `.next()` might find that the next term in the index doesn't appear in any live document. The original implementation just skipped such terms by recursively calling `.next()`, but this can lead to a StackOverflowError being thrown when there are lots of deleted terms. Switch the implementation to use a loop instead. The logic is otherwise unchanged.
- Loading branch information
1 parent
6ef902f
commit 63b4998
Showing
1 changed file
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters