On Wed, 7 Jan 2026 13:20:20 GMT, Per Minborg <[email protected]> wrote:

> The factory methods `(List|Map)::ofLazy` and `LazyConstant::get` specify that 
> an `IllegalStateException` is thrown upon a recursive invocation of the 
> computing function. However, it is not clear that this *only* applies if 
> recursion is made through the lazy entity (and not direct recursion on the 
> computing function itself).
> 
> This PR proposes to improve the wording in the docs for lazy constructs. This 
> is a doc-only change.
> 
> For example, we could replace the word "or" with the word "via" in the 
> `List::ofLazy` specification so that it says:
> 
>      * If the provided computing function recursively calls itself via the 
> returned
>      * lazy list for the same index, an {@linkplain IllegalStateException}
>      * will be thrown.

Looks good.

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

Marked as reviewed by rriggs (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29091#pullrequestreview-3635496758

Reply via email to