You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Christian Moen (JIRA)" <ji...@apache.org> on 2015/05/11 04:23:00 UTC

[jira] [Assigned] (LUCENE-6468) Empty kuromoji user dictionary -> NPE

     [ https://issues.apache.org/jira/browse/LUCENE-6468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Moen reassigned LUCENE-6468:
--------------------------------------

    Assignee: Christian Moen

> Empty kuromoji user dictionary -> NPE
> -------------------------------------
>
>                 Key: LUCENE-6468
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6468
>             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 UserDictionary.open(Reader) or similar, and return null if the FST is empty.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org