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 <[email protected]>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: [email protected] > For additional commands, e-mail: [email protected] > >
