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

NullReferenceException in ThreadLocal when Lucene.Net compiled for .Net 2.0

    XMLWordPrintableJSON

Details

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

    Description

      A NullReferenceException occurs in Lucene.Net.Util.ThreadLocal. This class is only included when Lucene is compiled for .Net 2.0.

      The cause is that the threadstatic "slots" variable is lazily-initialized, but there is no null-check in the dispose.

      Attachments

        1. CloseableThreadLocal.cs.patch
          0.4 kB
          Andrew Sampson

        Activity

          People

            Unassigned Unassigned
            malesh Andrew Sampson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: