lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Moen (JIRA)" <>
Subject [jira] [Commented] (LUCENE-6468) Empty kuromoji user dictionary -> NPE
Date Mon, 11 May 2015 09:41:00 GMT


Christian Moen commented on LUCENE-6468:

Thanks, Ohtani-san!

I added a {{final}} being required for {{branch_5x}} for JDK 1.7 and also changed the empty
user dictionary test to contain a user dictionary with a comment and some newlines (it's still
empty, though).

I've committed your patch to {{trunk}} and {{branch_5x}}.

> Empty kuromoji user dictionary -> NPE
> -------------------------------------
>                 Key: LUCENE-6468
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Christian Moen
>         Attachments: LUCENE-6468.patch
> Kuromoji user dictionary takes Reader and allows for comments and other lines to be ignored.
But if its "empty" in the sense of no actual entries, the returned FST will be null, and it
will throw a confusing NPE.
> JapaneseTokenizer and JapaneseAnalyzer apis already treat null UserDictionary as having
none at all, so I think the best fix is to fix the UserDictionary api from UserDictionary(Reader)
to or similar, and return null if the FST is empty.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message