On Fri, 17 Oct 2025 14:23:28 GMT, Maurizio Cimadamore <[email protected]> 
wrote:

>> Per Minborg has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Update docs after comments
>
> src/java.base/share/classes/java/util/List.java line 1235:
> 
>> 1233:      * or more lazy elements. The returned list's {@linkplain 
>> Object#toString() toString()}
>> 1234:      * method never triggers initialization of elements. Instead, an
>> 1235:      * implementation-dependant string is returned for uninitialized 
>> elements.
> 
> Suggestion:
> 
>      * implementation-dependent string is returned for uninitialized elements.

Design comment: I note some internal discomfort at the fact that 
equals/hashCode trigger initialization, but toString does not... effectively 
this would make replacing a regular immutable list with a lazy list not 
possible in all cases. Not saying we should do anything now -- but something to 
monitor

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27605#discussion_r2440214527

Reply via email to