You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2015/01/25 17:56:34 UTC
[jira] [Assigned] (METAMODEL-106) ElasticSearchDataContext throws
NPE when index is not found
[ https://issues.apache.org/jira/browse/METAMODEL-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kasper Sørensen reassigned METAMODEL-106:
-----------------------------------------
Assignee: Kasper Sørensen
I've made a proposed fix here: https://reviews.apache.org/r/30256/
Please review / comment
> ElasticSearchDataContext throws NPE when index is not found
> -----------------------------------------------------------
>
> Key: METAMODEL-106
> URL: https://issues.apache.org/jira/browse/METAMODEL-106
> Project: Apache MetaModel
> Issue Type: Bug
> Affects Versions: 4.3.0-incubating
> Reporter: Kasper Sørensen
> Assignee: Kasper Sørensen
>
> If I accidentally use a wrong index name when creating an ElasticSearchDataContext, I get an exception like this:
> {code}
> java.lang.NullPointerException
> at org.apache.metamodel.elasticsearch.ElasticSearchDataContext.detectSchema(ElasticSearchDataContext.java:161)
> at org.apache.metamodel.elasticsearch.ElasticSearchDataContext.<init>(ElasticSearchDataContext.java:122)
> {code}
> I would expect a more meaningful exception - either IllegalArgumentException or a MetaModelException - with a proper explanation as a message.
> We should also have sensible checks for null values and empty strings etc.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)