On Thu, 12 Sep 2024 12:45:25 GMT, Nir Lisker <nlis...@openjdk.org> wrote:

>> That may be the case, but I think that's preferrable to requiring two 
>> iterations of the list (one to figure out how many non-null values it 
>> contains, the second to copy over the values). In practice, there shouldn't 
>> be any nulls in most cases, as I don't know why someone would construct a 
>> `Background` or `Border` with many nulls in there.
>
> Is this code required to be so highly performant that you need to check for 
> `RandomAccess`? Under normal circumstances, I would just stream the list and 
> filter for `null`s.

This can run tens of thousands of times per second, which is probably not the 
ideal use case for streams.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1756849114

Reply via email to