uschindler commented on code in PR #13427:
URL: https://github.com/apache/lucene/pull/13427#discussion_r1616243372


##########
lucene/analysis/nori/src/java/org/apache/lucene/analysis/ko/dict/UserDictionary.java:
##########
@@ -134,7 +135,9 @@ private UserDictionary(List<String> entries) throws 
IOException {
     this.fst =
         new TokenInfoFST(FST.fromFSTReader(fstCompiler.compile(), 
fstCompiler.getFSTReader()));
     int[][] segmentations = _segmentations.toArray(new 
int[_segmentations.size()][]);
-    assert entryIndex == rightIds.length;
+    if (entryIndex < rightIds.length) {

Review Comment:
   I would move that up to behind line 103, because that's where rightIds is 
built and the (possibly) shorter array should be allocated there. After that 
all is done with rightIds.



-- 
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

Reply via email to