metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasper Sørensen (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (METAMODEL-106) ElasticSearchDataContext throws NPE when index is not found
Date Tue, 27 Jan 2015 19:56:34 GMT

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

Kasper Sørensen resolved METAMODEL-106.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 4.3.2

Fixed as per the review request's patch

> 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
>             Fix For: 4.3.2
>
>
> 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)

Mime
View raw message