[ 
https://issues.apache.org/jira/browse/LUCENE-5659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13993517#comment-13993517
 ] 

Robert Muir commented on LUCENE-5659:
-------------------------------------

Whats the use case? 

I dont think we should do this: this patch changes a 5-line method to a 50 line 
method.

If we really want to implement it iteratively instead of recursively, why not 
just do it the classical way with java.util.Stack?

Its no longer possible to "see what the algorithm is doing". The previous 
version you can look at and understand that its correct.

> SpecialOperations.isFinite hits StackOverflowError on automaton accepting 
> long strings
> --------------------------------------------------------------------------------------
>
>                 Key: LUCENE-5659
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5659
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 4.9, 5.0
>
>         Attachments: LUCENE-5659.patch
>
>
> Just like we fixed getFiniteStrings to not consume stack in proportion to the 
> longest string accepted by the automaton (LUCENE-5628), isFinite has the same 
> limitation.  The fix is pretty simple; I just share the code from 
> getFiniteStrings, but allocate two BitSets up front like the current impl.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to