8374717: Unclear wording in docs for recursion for List, Map and LazyConstant

Reviewed-by: rriggs
This commit is contained in:
Per Minborg 2026-01-19 07:45:21 +00:00
parent a67979c4e6
commit 75172e0658
3 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -87,9 +87,8 @@ import java.util.function.Supplier;
* is thrown. Hence, a lazy constant can never hold a {@code null} value. Clients who
* want to use a nullable constant can wrap the value into an {@linkplain Optional} holder.
* <p>
* If the computing function recursively invokes itself (directly or indirectly via
* the lazy constant), an {@linkplain IllegalStateException} is thrown, and the lazy
* constant is not initialized.
* If the computing function recursively invokes itself via the lazy constant, an
* {@linkplain IllegalStateException} is thrown, and the lazy constant is not initialized.
*
* <h2 id="composition">Composing lazy constants</h2>
* A lazy constant can depend on other lazy constants, forming a dependency graph

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1224,7 +1224,7 @@ public interface List<E> extends SequencedCollection<E> {
* The returned list and its {@link List#subList(int, int) subList()} or
* {@link List#reversed()} views implement the {@link RandomAccess} interface.
* <p>
* If the provided computing function recursively calls itself or the returned
* If the provided computing function recursively calls itself via the returned
* lazy list for the same index, an {@linkplain IllegalStateException}
* will be thrown.
* <p>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1777,7 +1777,7 @@ public interface Map<K, V> {
* The values of any {@link Map#values()} or {@link Map#entrySet()} views of
* the returned map are also lazily computed.
* <p>
* If the provided computing function recursively calls itself or
* If the provided computing function recursively calls itself via
* the returned lazy map for the same key, an {@linkplain IllegalStateException}
* will be thrown.
* <p>