lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dawid Weiss <dawid.we...@cs.put.poznan.pl>
Subject Re: [jira] [Updated] (LUCENE-2989) TestCollectionUtil fails on IBM JRE
Date Thu, 24 Mar 2011 18:35:32 GMT
If I can add my two cents, I recall there were various problems with
Collections.emptyList() not overriding equals and hashCode properly (so that
a comparison to another empty list, but of a different class was yielding
false).

Dawid

On Thu, Mar 24, 2011 at 7:28 PM, Chris Hostetter
<hossman_lucene@fucit.org>wrote:

>
> : The issue is a bug in IBM's Collections class. The List returned by
> : emptyList() does not implement RandomAccess.
> :
> : I fixed the test (unfortunately it's clear that emptyList() should
> : return a random access list, but it's not in the spec, so it's not
> : really IBM's fault). The fix is to use a realy empty Array and wrap it
> : with Arrays.asList().
>
> Should this make us rethink using Collections.emptyList() in the code
> base?  Should we be roling our own?
>
>
>
> -Hoss
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Mime
View raw message