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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.6
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      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.patch
          2 kB
          Uwe Schindler
        2. LUCENE-3630-addMissingMethod.patch
          2 kB
          Uwe Schindler
        3. LUCENE-3630-revert.patch
          7 kB
          Uwe Schindler

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: