Lucene - Core
  1. Lucene - Core
  2. LUCENE-2417

Fix IndexCommit hashCode() and equals() to be consistent

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.3, 3.0.2, 3.1, 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      IndexCommit's impl of hashCode() and equals() is inconsistent. One uses Dir + version and the other uses Dir + equals. According to hashCode()'s javadoc, if o1.equals(o2), then o1.hashCode() == o2.hashCode(). Simple fix, and I'll add a test case.

        Activity

        Shai Erera created issue -
        Hide
        Shai Erera added a comment -

        Fixes hashCode() to use getVersion and adds TestIndexCommit. All tests pass. I plan to commit shortly.

        Show
        Shai Erera added a comment - Fixes hashCode() to use getVersion and adds TestIndexCommit. All tests pass. I plan to commit shortly.
        Shai Erera made changes -
        Field Original Value New Value
        Attachment LUCENE-2417.patch [ 12443082 ]
        Hide
        Shai Erera added a comment -

        Committed revision 938989.

        Show
        Shai Erera added a comment - Committed revision 938989.
        Shai Erera made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Shai Erera added a comment -

        Backport to 3.1

        Show
        Shai Erera added a comment - Backport to 3.1
        Shai Erera made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Shai Erera made changes -
        Fix Version/s 3.1 [ 12314822 ]
        Hide
        Shai Erera added a comment -

        Committed revision 941394.

        Show
        Shai Erera added a comment - Committed revision 941394.
        Shai Erera made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Michael McCandless added a comment -

        backport

        Show
        Michael McCandless added a comment - backport
        Michael McCandless made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Michael McCandless made changes -
        Fix Version/s 2.9.3 [ 12314799 ]
        Fix Version/s 3.0.2 [ 12314798 ]
        Michael McCandless made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12509541 ] Default workflow, editable Closed status [ 12563208 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12563208 ] jira [ 12584282 ]

          People

          • Assignee:
            Shai Erera
            Reporter:
            Shai Erera
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development