stefanvodita commented on code in PR #12462: URL: https://github.com/apache/lucene/pull/12462#discussion_r1284222699
########## lucene/core/src/java/org/apache/lucene/util/automaton/RegExp.java: ########## @@ -30,6 +30,7 @@ package org.apache.lucene.util.automaton; import java.io.IOException; +import java.util.ArrayDeque; Review Comment: Are we using `ArrayDeque` because we expect it to be faster than a `Stack`? ########## lucene/core/src/java/org/apache/lucene/util/automaton/RegExp.java: ########## @@ -1067,22 +1068,44 @@ private boolean check(int flag) { } final RegExp parseUnionExp() throws IllegalArgumentException { Review Comment: These three methods loo similar. Is it worth trying to extract out their bodies to a common method? This new method would take 3 functions as arguments, one to call in the `do-while` loop, one for the `do-while` condition, and one to call in the `while` loop after. -- 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-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org