Lucene - Core
  1. Lucene - Core
  2. LUCENE-2030

CachingSpanFilter synchronizing on a none final protected object

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 3.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      CachingSpanFilter and CachingWrapperFilter expose their internal cache via a protected member which is lazily instantiated in the getDocSetId method. The current code yields the chance to double instantiate the cache and internally synchronizes on a protected none final member. My first guess is that this member was exposed for testing purposes so it should rather be changed to package private.

      This patch breaks backwards compat while I guess the cleanup is kind of worth breaking it.

      1. LUCENE-2030.patch
        3 kB
        Simon Willnauer
      2. LUCENE-2030.patch
        3 kB
        Uwe Schindler
      3. LUCENE-2030.patch
        4 kB
        Uwe Schindler
      4. LUCENE-2030.patch
        5 kB
        Uwe Schindler

        Activity

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Simon Willnauer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development