lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Elschot (JIRA)" <>
Subject [jira] Updated: (LUCENE-2945) Surround Query doesn't properly handle equals/hashcode
Date Wed, 09 Mar 2011 22:08:59 GMT


Paul Elschot updated LUCENE-2945:

    Attachment: LUCENE-2945c.patch

The LUCENE-2945c.patch starts from the patch of 5 March. It adds static inner classes to with
hashCode() and equals() as needed here.
For now, these classes throw a RuntimeException created from a CloneNotSupportedException
in their clone() methods. This leaves clone() not correctly implemented, but at least now
a RuntimeException is thrown instead of previously returning an incorrect result.

The patch also includes a single passing test in SrndQueryTest for equal queries when parsed
from strings that only differ in whitespace. The other tests there have been commented out
because they use clone() via QueryUtils

More tests are still needed, also  for inequality. The earlier tests all pass.

> Surround Query doesn't properly handle equals/hashcode
> ------------------------------------------------------
>                 Key: LUCENE-2945
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 3.0.3, 3.1, 4.0
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 3.1.1, 4.0
>         Attachments: LUCENE-2945-partial1.patch, LUCENE-2945.patch, LUCENE-2945.patch,
LUCENE-2945.patch, LUCENE-2945c.patch
> In looking at using the surround queries with Solr, I am hitting issues caused by collisions
due to equals/hashcode not being implemented on the anonymous inner classes that are created
by things like DistanceQuery (branch 3.x, near line 76)

This message is automatically generated by JIRA.
For more information on JIRA, see:

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

View raw message