Skip to content

Commit fc9aa6c

Browse files
committed
Clarify recursive invocation in the docs
1 parent 2074b97 commit fc9aa6c

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/java.base/share/classes/java/lang/LazyConstant.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@
8787
* is thrown. Hence, a lazy constant can never hold a {@code null} value. Clients who
8888
* want to use a nullable constant can wrap the value into an {@linkplain Optional} holder.
8989
* <p>
90-
* If the computing function recursively invokes itself (directly or indirectly via
91-
* the lazy constant), an {@linkplain IllegalStateException} is thrown, and the lazy
92-
* constant is not initialized.
90+
* If the computing function recursively invokes itself via the lazy constant, an
91+
* {@linkplain IllegalStateException} is thrown, and the lazy constant is not initialized.
9392
*
9493
* <h2 id="composition">Composing lazy constants</h2>
9594
* A lazy constant can depend on other lazy constants, forming a dependency graph

src/java.base/share/classes/java/util/List.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ static <E> List<E> copyOf(Collection<? extends E> coll) {
12241224
* The returned list and its {@link List#subList(int, int) subList()} or
12251225
* {@link List#reversed()} views implement the {@link RandomAccess} interface.
12261226
* <p>
1227-
* If the provided computing function recursively calls itself or the returned
1227+
* If the provided computing function recursively calls itself via the returned
12281228
* lazy list for the same index, an {@linkplain IllegalStateException}
12291229
* will be thrown.
12301230
* <p>

src/java.base/share/classes/java/util/Map.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ static <K, V> Map<K, V> copyOf(Map<? extends K, ? extends V> map) {
17771777
* The values of any {@link Map#values()} or {@link Map#entrySet()} views of
17781778
* the returned map are also lazily computed.
17791779
* <p>
1780-
* If the provided computing function recursively calls itself or
1780+
* If the provided computing function recursively calls itself via
17811781
* the returned lazy map for the same key, an {@linkplain IllegalStateException}
17821782
* will be thrown.
17831783
* <p>

0 commit comments

Comments
 (0)