Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2103

NoLockFactory should have a private constructor

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.0
    • 4.0-ALPHA
    • core/store
    • None
    • New, Patch Available

    Description

      NoLockFactory documents in its javadocs that one should use the static getNoLockFactory() method. However the class does not declare a private empty constructor, which breaks its Singleton purpose. We cannot add the empty private constructor because that'd break break-compat (even though I think it's very low chance someone actually instantiates the class), therefore we'll add a @deprecated warning to the class about this, and add the method in 4.0. I personally prefer to add an empty constructor w/ the @deprecated method, but am fine either way.

      Don't know if a patch is needed, as this is a trivial change.

      Attachments

        1. LUCENE-2103.patch
          1 kB
          Uwe Schindler
        2. LUCENE-2103.patch
          0.8 kB
          Uwe Schindler

        Activity

          People

            uschindler Uwe Schindler
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: