You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2015/07/21 19:24:05 UTC

[jira] [Updated] (SOLR-7765) TokenizerChain methods may return null depending on how constructor is called -- causes NPE in luke request handler

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

Hoss Man updated SOLR-7765:
---------------------------
    Description: 
{{TokenizerChain}} created using 2-arg constructor has {{null}} in {{charFilters}}, so {{LukeRequestHandler}} throws NPE on iterating it.

{{TokenizerChain}} constructor's should be hardened to do explicit null checks, throwing early NPE where appropriate (tokenizer factory), or initializing internal arrays to have 0 length when optional (factories for char filters and token filters)

  was:
{{TokenizerChain}} created using 2-arg constructor has {{null}} in {{charFilters}}, so {{LukeRequestHandler}} throws NPE on iterating it.

Will create PR in a couple of minutes.

        Summary: TokenizerChain methods may return null depending on how constructor is called -- causes NPE in luke request handler  (was: TokenizerChain without char filters cause NPE in luke request handler)

> TokenizerChain methods may return null depending on how constructor is called -- causes NPE in luke request handler
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-7765
>                 URL: https://issues.apache.org/jira/browse/SOLR-7765
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 5.2.1
>            Reporter: Konstantin Gribov
>            Assignee: Hoss Man
>            Priority: Minor
>         Attachments: SOLR-7765.patch, SOLR-7765.patch, SOLR-7765.patch
>
>
> {{TokenizerChain}} created using 2-arg constructor has {{null}} in {{charFilters}}, so {{LukeRequestHandler}} throws NPE on iterating it.
> {{TokenizerChain}} constructor's should be hardened to do explicit null checks, throwing early NPE where appropriate (tokenizer factory), or initializing internal arrays to have 0 length when optional (factories for char filters and token filters)



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