RFR: 8180352: Add Stream.toList() method
Remi Forax
forax at univ-mlv.fr
Tue Nov 3 22:47:22 UTC 2020
----- Mail original -----
> De: "Martin Desruisseaux" <martin.desruisseaux at geomatys.com>
> À: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Mardi 3 Novembre 2020 23:16:49
> Objet: Re: RFR: 8180352: Add Stream.toList() method
> Hello
>
> Le 03/11/2020 à 21:30, forax at univ-mlv.fr a écrit :
>
>> You know that you can not change the implementation of
>> Collectors.toList(), and you also know that if there is a method
>> Stream.toList(), people will replace the calls to
>> .collect(Collectors.toList()) by a call to Stream.toList() for the
>> very same reason (…snip…)
>>
> Would they would be so numerous to do this change without verifying if
> the specifications match? (on my side I do read the method javadoc). But
> even if we worry about developers not reading javadoc, the argument
> could go both ways: they could assume that all Stream methods accepts
> null and not read that Stream.toList() specifies otherwise.
yes, that why i said to Brian that he is right that stream.toList() should return a List that accept null.
>
> Martin
Rémi
More information about the core-libs-dev
mailing list