You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Alexandre Rafalovitch (Jira)" <ji...@apache.org> on 2020/08/29 20:33:00 UTC

[jira] [Resolved] (SOLR-12970) Inconsistency between VariableResolver returning "" and FieldStreamDataSource testing for null

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

Alexandre Rafalovitch resolved SOLR-12970.
------------------------------------------
    Resolution: Won't Fix

> Inconsistency between VariableResolver returning "" and FieldStreamDataSource testing for null
> ----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-12970
>                 URL: https://issues.apache.org/jira/browse/SOLR-12970
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 7.5
>         Environment: solr 7.5.0, tried on win7 32 and ubuntu x64.
> I get the problem with oracle data source, because I typed field name lower case, I had to type it upper case.
>            Reporter: Pierre Beck
>            Priority: Minor
>
> If one mistype dataField, we should get an error "No field available for name : "
> Instead you get a mystic  "unsupported type : class java.lang.String"
>  
> in FieldStreamDataSource.java
> https://github.com/apache/lucene-solr/blob/master/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FieldStreamDataSource.java
> l. 63, if (o == null) {
>  the code is testing if the freshly returned o is null
> But in VariableResolver.java 
> (https://github.com/apache/lucene-solr/blob/master/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/VariableResolver.java)
> public Object resolve(String name) {
> l 118 : return r == null ? "" : r;
> If field cannot be resolved, resolve() returns "" instead of null. But getData() is expecting null if unresolved and throw a more explanary error l. 64 throw new DataImportHandlerException(SEVERE, "No field available for name : " + dataField);



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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