lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: BooleanQuery.equals() change
Date Tue, 12 Apr 2005 17:25:16 GMT
On Apr 12, 2005, at 10:59 AM, Yonik Seeley wrote:
>> On Apr 11, 2005, at 5:57 PM, Yonik Seeley wrote:
>>> Erik, why was the last change to BooleanQuery made?
>>> The comment was "Correct BooleanQuery.equals such that every clause 
>>> is
>>> compared".
>>>
>>> It looks like Vector.equals() should have worked, and the new code is
>>> probably slower as it creates two new arrays.
>>
>> Vector.equals() compares the Vector object instances and is only true
>> if they are the same object - it does not compare the contents of the
>> Vector for equality at that level.  Try it out with some test cases.
>
> ???
> Did you try it out? (sorry, couldn't resist ;-)

Fair enough!  In fact I did try and I stand completely corrected.   I 
have reverted the change to BooleanQuery.equals and added a test case.

I was certain, up to this point, that I had a test case failing on 
another project due to BooleanQuery.equals and that I fixed it by 
making the change - but apparently I was delusional as all seems to be 
well as it originally was.

Thanks for your persistence and education!

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message