You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Cassandra Targett (JIRA)" <ji...@apache.org> on 2018/01/11 20:08:00 UTC

[jira] [Updated] (SOLR-6047) FieldType.getTypeName() may be null for internal types

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

Cassandra Targett updated SOLR-6047:
------------------------------------
    Component/s: Schema and Analysis

> FieldType.getTypeName() may be null for internal types
> ------------------------------------------------------
>
>                 Key: SOLR-6047
>                 URL: https://issues.apache.org/jira/browse/SOLR-6047
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>            Reporter: Ryan Ernst
>
> Some field types use associated types to store information.  For example, the CurrencyField uses a long and string field to store the amount and currency.  When constructing these associated types, the currency init function sets the type name on both field types (which it can do since it is in the same java package as FieldType).
> When the type name is not set, the LukeRequestHandler will get an NPE when trying to load the types (e.g when trying to view the schema browser, specifically when doing a Map.get with the type name, which is null).
> I think FieldType.setTypeName should be public instead of package private, or LukeRequestHandler should protect against a null type name (skipping it? since it is an implementation detail of a type in the schema?), or both.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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