lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Currens (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (LUCENENET-472) Operator == on Parameter does not check for null arguments
Date Fri, 23 Mar 2012 19:51:27 GMT

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

Christopher Currens closed LUCENENET-472.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: Lucene.Net 3.0.3

Equals wasn't checking for null either.  I've added the equality operators to Parameter and
fixed equals.  However, this class is barely used anymore, since Lucene moved to enum.  The
only class that uses it BooleanClause, because of the overridden ToString(), which can't be
emulated with enums in .NET.   
                
> Operator == on Parameter does not check for null arguments
> ----------------------------------------------------------
>
>                 Key: LUCENENET-472
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-472
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 2.9.4g
>            Reporter: Pieter van Ginkel
>             Fix For: Lucene.Net 3.0.3
>
>
> The operator == and operator != of Parameter does not check for null arguments. This
means that the following construct throws an NullReferenceException:
> if (store == null)
>     throw new ArgumentNullException("store");
> Work around is to write the above as:
> if ((object)store == null)
>     throw new ArgumentNullException("store");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message