I think i prefer toImmutableList() than toUnmodifiableList() because the List 
is truly immutable and not an unmodifiable proxy in front of a mutable List 
(like Collections.unmodifiableList() does).

Rémi

----- Mail original -----
> De: "Stephen Colebourne" <scolebou...@joda.org>
> À: "core-libs-dev" <core-libs-dev@openjdk.java.net>
> Envoyé: Mercredi 22 Novembre 2017 16:42:56
> Objet: Re: RFR(m): 8177290 add copy factory methods for unmodifiable List, 
> Set, Map

> On 19 November 2017 at 03:34, John Rose <john.r.r...@oracle.com> wrote:
>> Meanwhile, `toUnmodifiableList` is so ugly to the ear,
>> eye, and fingers that it will be less used just because of
>> its long spelling.
> 
> Many developers are already using Google Guava which has added
> toImmutableList() and friends. More widely, we use the toXxx() form
> for all the collectors we've written (in OpenGamma Strata). As such, I
> think the toXxx() naming is well established at this point, and
> toUnmodifiableList() will be fine.
> 
> Stephen

Reply via email to