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

MultiReader and ParallelReader accidently override doOpenIfChanged(boolean readOnly) with doOpenIfChanged(boolean doClone)

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5
    • 3.6
    • core/index
    • None
    • New

    Description

      I found this during adding deprecations for RW access in LUCENE-3606:

      the base class defines doOpenIfChanged(boolean readOnly), but MultiReader and ParallelReader "override" this method with a signature doOpenIfChanged(doClone) and missing @Override. This makes consumers calling IR.openIfChanged(boolean readOnly) do the wrong thing. Instead they should get UOE like for the other unimplemented doOpenIfChanged methods in MR and PR.

      Easy fix is to rename and hide this internal "reopen" method, like DirectoryReader,...

      Attachments

        1. LUCENE-3630-revert.patch
          7 kB
          Uwe Schindler
        2. LUCENE-3630-addMissingMethod.patch
          2 kB
          Uwe Schindler
        3. LUCENE-3630.patch
          2 kB
          Uwe Schindler

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: