dweiss commented on a change in pull request #665: URL: https://github.com/apache/lucene/pull/665#discussion_r802644902
########## File path: lucene/analysis/morfologik/src/java/org/apache/lucene/analysis/uk/UkrainianMorfologikAnalyzer.java ########## @@ -113,14 +113,11 @@ private static DefaultResources getDefaultResources() { return defaultResources; } - private static class DefaultResources { - final CharArraySet stopSet; - final Dictionary dictionary; + private record DefaultResources(CharArraySet stopSet, Dictionary dictionary) {} - private DefaultResources(CharArraySet stopSet, Dictionary dictionary) { - this.stopSet = stopSet; - this.dictionary = dictionary; - } + /** Returns the default stopword set for this analyzer */ + public static CharArraySet getDefaultStopwords() { + return getDefaultResources().stopSet; Review comment: I'd return a copy of the default source set instead of its reference - this makes any accidental changes to the set a no-op on the defaults? -- 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