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

Operator == on Parameter does not check for null arguments

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Lucene.Net 2.9.4g
    • Fix Version/s: Lucene.Net 3.0.3
    • Component/s: Lucene.Net Core
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: