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

TermQuery's constructors should clone the incoming term

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This is a follow-up of LUCENE-6435: the bug stems from the fact that you can build term queries out of shared BytesRef objects (such as the ones returned by TermsEnum.next), which is a bit trappy. If TermQuery's constructors would clone the incoming term, we wouldn't have this trap.

        Attachments

        1. LUCENE-6821.patch
          5 kB
          Paul Elschot
        2. LUCENE-6821.patch
          9 kB
          Paul Elschot
        3. LUCENE-6821.2.patch
          13 kB
          Tommaso Teofili

          Activity

            People

            • Assignee:
              teofili Tommaso Teofili
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: