You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "rmuir (via GitHub)" <gi...@apache.org> on 2023/05/12 02:29:22 UTC

[GitHub] [lucene] rmuir commented on a diff in pull request #12286: toposort use iterator to avoid stackoverflow

rmuir commented on code in PR #12286:
URL: https://github.com/apache/lucene/pull/12286#discussion_r1191848264


##########
lucene/core/src/java/org/apache/lucene/util/automaton/Operations.java:
##########
@@ -1284,7 +1290,7 @@ public static int[] topoSortStates(Automaton a) {
     int numStates = a.getNumStates();
     int[] states = new int[numStates];
     final BitSet visited = new BitSet(numStates);

Review Comment:
   now that the helper method is no longer recursive, can remove `visited` as a parameter and let the `private` topoSortStates initialize it? I think it would just improve it slightly since only the helper looks at it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org