On 11/18/20 3:55 AM, Florian Weimer wrote:
I think it's also needed for an efficient null element check in
List::copyOf. I have a hunch that with the posted implementation, it
would incorrectly produce an immutable list that contains null
elements.
(Sorry for the delay; oddly, this comment
On Tue, 17 Nov 2020 20:04:58 GMT, Stuart Marks wrote:
>>> @plevart wrote:
>>>
>>> > But the question is how does having a separate CollSer.IMM_LIST_NULLS
>>> > type prevent that from happening?
>>>
>>> When a serialized list with IMM_LIST_NULLS is deserialized on an older JDK,
>>> it'll throw
- Mail original -
> De: "Florian Weimer"
> À: "Peter Levart"
> Cc: "Stuart Marks" , "core-libs-dev"
>
> Envoyé: Mercredi 18 Novembre 2020 12:55:02
> Objet: Re: RFR: 8180352: Add Stream.toList() method [v2]
> * Peter Levart
* Peter Levart:
> But I see that the new IMM_LIST_NULLS type is needed for one other
> thing - the immutable list implementation of that type has different
> behavior of indexOf and lastIndexOf methods (it doesn't throw NPE when
> null is passed to those methods) so this behavior has to be pre
On 11/17/20 9:08 PM, Stuart Marks wrote:
@plevart wrote:
Yes, but that is JDK16+ vs. JDK15- and not App V1 vs. App V2 thing. If both
apps run on JDK16+, there will be no exception.
Sure, the IMM_LIST_NULLS tag only helps with serialization compatibility across
JDK releases.
I would say i
On Tue, 10 Nov 2020 09:34:56 GMT, Peter Levart wrote:
>> I can see that having a separate IMM_LIST_NULLS type might be necessary to
>> preserve the allows-null/disallows-null behaviour of indexOf and lastIndexOf
>> methods...
>>
>> NOTE ALSO that ListN.equals(o) and ListN.hashCode() are inheri
On Sun, 8 Nov 2020 15:55:58 GMT, Peter Levart wrote:
>> Hi Stuart,
>>
>> I would like to discuss the serialization. You introduce new
>> CollSer.IMM_LIST_NULLS type of immutable collection. This means that if this
>> change goes into JDK16 for example, JDK15 and before will not be able to
>>
On Sun, 8 Nov 2020 15:55:58 GMT, Peter Levart wrote:
>> Hi Stuart,
>>
>> I would like to discuss the serialization. You introduce new
>> CollSer.IMM_LIST_NULLS type of immutable collection. This means that if this
>> change goes into JDK16 for example, JDK15 and before will not be able to
>>
On Sun, 8 Nov 2020 10:47:08 GMT, Peter Levart wrote:
>>> Simon Roberts wrote:
>>
>>> This discussion of unmodifiable lists brings me back to the thought that
>>> there would be good client-side reasons for inserting an UnmodifiableList
>>> interface as a parent of LIst, not least because all our
On Fri, 6 Nov 2020 03:05:45 GMT, Stuart Marks wrote:
>> @ePaul wrote:
>>
>>> The Stream API works just as well with [third party] collection libraries
>>> instead of the java.util ones, just using different collectors. Adding a
>>> method which directly returns a java.util.List somewhat couple
> This change introduces a new terminal operation on Stream. This looks like a
> convenience method for Stream.collect(Collectors.toList()) or
> Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this
> method directly on Stream enables it to do what can't easily by done by a
11 matches
Mail list logo