On Fri, 25 Apr 2025 09:17:13 GMT, Luca Kellermann <d...@openjdk.org> wrote:
>> `setOrThrow` might be invoked several times. If the first invocation failed >> because the supplier threw and then the second invocation (with the same >> supplier) succeded (because there was some state that changed), we have this >> situation. > > `orElseSet` is the method taking a supplier, `setOrThrow` doesn't. Ahh. I'm sorry for misreading this. The docs should say `orElseSet` rather than `orElseThrow`. Again, we will fix this in a follow-up PR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2065757267