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

FieldBoostMapAttribute in contrib/qp is broken.

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1, 4.0-ALPHA
    • modules/other
    • None
    • New, Patch Available

    Description

      While looking for more SuppressWarnings in lucene, i came across two of them in contrib/queryparser.

      even worse, i found these revolved around using maps with CharSequence as key.

      From the javadocs for CharSequence:

      This interface does not refine the general contracts of the equals and hashCode methods. The result of comparing two objects that implement CharSequence is therefore, in general, undefined. Each object may be implemented by a different class, and there is no guarantee that each class will be capable of testing its instances for equality with those of the other. It is therefore inappropriate to use arbitrary CharSequence instances as elements in a set or as keys in a map.

      Attachments

        1. LUCENE-2712.patch
          6 kB
          Robert Muir

        Activity

          People

            rcmuir Robert Muir
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: