Uploaded image for project: 'Lucene.Net'
  1. Lucene.Net
  2. LUCENENET-472

Operator == on Parameter does not check for null arguments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Lucene.Net 2.9.4g
    • Lucene.Net 3.0.3
    • Lucene.Net Core
    • None

    Description

      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");

      Attachments

        Activity

          People

            Unassigned Unassigned
            pvginkel Pieter van Ginkel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: