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

Remove unnecessary Directory parameters from SIS/SIPC/SI

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      A few methods take Directory where it makes no sense:

      Collection SegmentInfos.files(Directory dir, boolean includeSegmentsFile);
      String SegmentInfos.toString(Directory dir);
      String SegmentCommitInfo.toString(Directory dir, int pendingDelCount);
      String SegmentInfo.toString(Directory dir, int delCount);
      

      The incoming Directory parameter for files() is bogus, if assertions are enabled, it fails if any underlying segment's 'dir' differs. But if assertions are not enabled, it just silently drops them. If we want to add safety around this kind of thing, this is not the way.

      For toString(), it just makes the API hard to use for everyone. This change means commits have a working Object.toString() method.

        Activity

        Hide
        rcmuir Robert Muir added a comment -

        Patch. all tests pass.

        Show
        rcmuir Robert Muir added a comment - Patch. all tests pass.
        Hide
        mikemccand Michael McCandless added a comment -

        +1

        Show
        mikemccand Michael McCandless added a comment - +1
        Hide
        simonw Simon Willnauer added a comment -

        +1 LGTM thanks rob

        Show
        simonw Simon Willnauer added a comment - +1 LGTM thanks rob
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1661172 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1661172 ]

        LUCENE-6266: Remove unnecessary Directory parameters from SIS/SIPC/SI

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1661172 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1661172 ] LUCENE-6266 : Remove unnecessary Directory parameters from SIS/SIPC/SI
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1661177 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1661177 ]

        LUCENE-6266: remove deprecations

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1661177 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1661177 ] LUCENE-6266 : remove deprecations
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1661189 from Robert Muir in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1661189 ]

        LUCENE-6266: Remove unnecessary Directory parameters from SIS/SIPC/SI

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1661189 from Robert Muir in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1661189 ] LUCENE-6266 : Remove unnecessary Directory parameters from SIS/SIPC/SI
        Hide
        thelabdude Timothy Potter added a comment -

        Bulk close after 5.1 release

        Show
        thelabdude Timothy Potter added a comment - Bulk close after 5.1 release

          People

          • Assignee:
            Unassigned
            Reporter:
            rcmuir Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development