Collection.toArray <was> Re: Loose ends inventory

Paul Sandoz paul.sandoz at oracle.com
Tue Jun 11 08:30:58 PDT 2013


On Jun 11, 2013, at 1:21 AM, Brian Goetz <brian.goetz at Oracle.COM> wrote:
>> - Add A[] toArray(IntFunction<A[]> generator) to Collection.
> 
> Got stalled.
> 

This got stalled on the niggle of toArray(null) which would be ambiguous, and likely affects tests in the TCK.

IMHO it would be a shame if we cannot update due to source code compatibility that is only ever likely to occur with tests, some of which we can easily fix.

On a related note we added the default method Collection.removeIf(Predicate<? super E> filter), originally it was called removeAll but changed to due the same source code incompatibility, so we could revisit that name too.

Paul.



More information about the lambda-libs-spec-observers mailing list