zhaih commented on a change in pull request #157: URL: https://github.com/apache/lucene/pull/157#discussion_r642115585
########## File path: lucene/analysis/common/src/java/org/apache/lucene/analysis/core/FlattenGraphFilter.java ########## @@ -240,7 +252,13 @@ private boolean releaseBufferedToken() { output.nextOut++; if (output.nextOut == output.inputNodes.size()) { outputFrom++; - inputNodes.freeBefore(output.inputNodes.get(0)); + int freeBefore = Collections.min(output.inputNodes); + assert outputNodes.get(outputFrom).inputNodes.stream() + .filter(n -> freeBefore < n) + .count() + > 0 + : "FreeBefore " + output.inputNodes.get(0) + " will free in use nodes"; Review comment: Same question? -- 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. 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