matthias-mueller commented on code in PR #12299:
URL: https://github.com/apache/lucene/pull/12299#discussion_r1196380870


##########
lucene/core/src/java/org/apache/lucene/analysis/WordlistLoader.java:
##########
@@ -53,7 +53,10 @@ public static CharArraySet getWordSet(Reader reader, 
CharArraySet result) throws
     try (BufferedReader br = getBufferedReader(reader)) {
       String word = null;
       while ((word = br.readLine()) != null) {
-        result.add(word.trim());
+        word = word.trim();
+        // skip blank lines
+        if (word.length() == 0) continue;

Review Comment:
   @uschindler then sorry for the noise - I was tiggered by 
`SmartCHINESEAnalyzer` and the lack of unicode whitespace support in 
`String.trim()`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to