lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Svensson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENENET-605) NullReference Exception is thrown if we create a term with null searchterm
Date Mon, 21 Jan 2019 07:24:00 GMT

    [ https://issues.apache.org/jira/browse/LUCENENET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16747708#comment-16747708
] 

Simon Svensson commented on LUCENENET-605:
------------------------------------------

You're correct in that ArgumentNullException would be the way to do this in .NET. However,
we're currently trying to stay as close as possible as the Java code, and  there are no such
checks there. I'll close this issue for now, and we can revisit it later once we're looking
into making our api more .net-ish.

> NullReference Exception is thrown if we create a term with null searchterm
> --------------------------------------------------------------------------
>
>                 Key: LUCENENET-605
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-605
>             Project: Lucene.Net
>          Issue Type: Bug
>    Affects Versions: Lucene.Net 4.8.0
>            Reporter: Muhammad Waleed
>            Priority: Major
>
> if you try to create a term by specifying fieldname and null as searchterm, NullReference
Exception is thrown, e.g.
> *Term term = new Term("ID", null);*
> However it should throw proper error message like parameter name is null or something
likewise. 
> Null Reference exception shows that something is not properly handled underneath,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message