donnerpeter commented on code in PR #12316: URL: https://github.com/apache/lucene/pull/12316#discussion_r1199286526
########## lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Dictionary.java: ########## @@ -155,7 +155,7 @@ public class Dictionary { boolean checkCompoundCase, checkCompoundDup, checkCompoundRep; boolean checkCompoundTriple, simplifiedTriple; int compoundMin = 3, compoundMax = Integer.MAX_VALUE; - List<CompoundRule> compoundRules; // nullable + CompoundRule[] compoundRules; // nullable Review Comment: With the list, the question arose whether to iterate over it with foreach or with indexed access. The latter definitely has no allocations but results in wordier code (including an IDE suppression comment). So I chose an array to get the best of both worlds :) -- 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