lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Elschot (JIRA)" <>
Subject [jira] [Updated] (LUCENE-6821) TermQuery's constructors should clone the incoming term
Date Sat, 03 Oct 2015 13:47:26 GMT


Paul Elschot updated LUCENE-6821:
    Attachment: LUCENE-6821.patch

Patch of 3 Oct 2015. This
- adds a call to BytesRef.deepCopyOf in the Term constructor,
- removes such calls where the Term constructor is used, and
- documents that the result of Term.bytes() should not be modified.

> TermQuery's constructors should clone the incoming term
> -------------------------------------------------------
>                 Key: LUCENE-6821
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-6821.patch
> 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, which
is a bit trappy. If TermQuery's constructors would clone the incoming term, we wouldn't have
this trap.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message