[External] : Could someone answer this question about Gatherers?

Chen Liang chen.l.liang at oracle.com
Fri May 23 16:42:38 UTC 2025


Yes, please pull it up. We have a patch ready at https://github.com/openjdk/jdk/pull/25418, and I can test if this patch fixes your said bug.
________________________________
From: core-libs-dev <core-libs-dev-retn at openjdk.org> on behalf of David Alayachew <davidalayachew at gmail.com>
Sent: Friday, May 23, 2025 10:28 AM
To: Viktor Klang <viktor.klang at oracle.com>
Cc: core-libs-dev <core-libs-dev at openjdk.org>
Subject: Re: [External] : Could someone answer this question about Gatherers?

Ty vm.

You don't think this has anything to do with my bug from 6 months ago, where the parallel stream caused OOME, but the sequential ones short-circuited correctly? I can pull up the thread if you don't recall.

On Fri, May 23, 2025, 11:26 AM Viktor Klang <viktor.klang at oracle.com<mailto:viktor.klang at oracle.com>> wrote:
I've opened a PR to prevent this from occurring: https://github.com/openjdk/jdk/pull/25418/files

However, there's an argument to be made that an unbounded Spliterator (as obtained by Random::ints(…)) should not report the SIZED and SUBSIZED characteristics, as it is indeed not sized. I'll open a separate Issue for that next week.

Cheers,
√


Viktor Klang
Software Architect, Java Platform Group
Oracle
________________________________
From: core-libs-dev <core-libs-dev-retn at openjdk.org<mailto:core-libs-dev-retn at openjdk.org>> on behalf of Viktor Klang <viktor.klang at oracle.com<mailto:viktor.klang at oracle.com>>
Sent: Friday, 23 May 2025 14:56
To: David Alayachew <davidalayachew at gmail.com<mailto:davidalayachew at gmail.com>>; core-libs-dev <core-libs-dev at openjdk.org<mailto:core-libs-dev at openjdk.org>>
Subject: Re: [External] : Could someone answer this question about Gatherers?

Hi David,

This definitely sounds like a bug, so I've opened: https://bugs.openjdk.org/browse/JDK-8357647

Thanks,
√


Viktor Klang
Software Architect, Java Platform Group
Oracle

________________________________
From: David Alayachew <davidalayachew at gmail.com<mailto:davidalayachew at gmail.com>>
Sent: Friday, 23 May 2025 12:44
To: Viktor Klang <viktor.klang at oracle.com<mailto:viktor.klang at oracle.com>>; core-libs-dev <core-libs-dev at openjdk.org<mailto:core-libs-dev at openjdk.org>>
Subject: [External] : Could someone answer this question about Gatherers?

Hello Core Libs Dev Team,

A post came up on StackOverflow recently that asked a question about Gatherers -- https://stackoverflow.com/questions/79622707/why-doesnt-my-gatherer-short-circuit-the-stream-if-the-source-is-an-intstream<https://urldefense.com/v3/__https://stackoverflow.com/questions/79622707/why-doesnt-my-gatherer-short-circuit-the-stream-if-the-source-is-an-intstream__;!!ACWV5N9M2RV99hQ!KhxjMRzkOiiBNBaL_BG18YPs2hMlI1zI-y2lkZGQrJYHDCG0Zx14MAejks8opab_5tJD_M-o-lSxqLXHeeHWUuJtIS8$>

Just raising it here, as I think the only folks equipped to answer that question are people already on this mailing list.

Thank you for your time and help!
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250523/dccec3a4/attachment-0001.htm>


More information about the core-libs-dev mailing list