On Fri, 24 Apr 2026 09:02:04 GMT, Per Minborg <[email protected]> wrote:

>> Implement JEP 531: Lazy Constants (Third Preview)
>> 
>> This PR replaces _draft_ https://github.com/openjdk/jdk/pull/29507
>> 
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Per Minborg has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Change the way throwing toString is handled

src/java.base/share/classes/java/util/Map.java line 1805:

> 1803:      * The returned Map is <em>not</em> {@linkplain Serializable}.
> 1804:      * <p>
> 1805:      * If the provided Set of {@code keys} is subsequently modified, 
> the returned Map will

Some weird capitalizations of set/map -- either you use lower case, or you wrap 
in code blocks IMHO

src/java.base/share/classes/java/util/Map.java line 1816:

> 1814:      * operation is equivalent to:
> 1815:      * {@snippet lang = java:
> 1816:      * class LazyMap<K, V> extends AbstractMap<K, V> {

I like the code examples you added here (and elsewhere) -- they make the 
concepts more concrete

src/java.base/share/classes/java/util/Set.java line 85:

> 83:  * <li>They disallow {@code null} elements. Attempts to create them with
> 84:  * {@code null} elements result in {@code NullPointerException}.
> 85:  * <li>Unless otherwise specified, they are serializable if all elements 
> are serializable.

Good catch -- List/Map already do this

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30194#discussion_r3146030127
PR Review Comment: https://git.openjdk.org/jdk/pull/30194#discussion_r3146037873
PR Review Comment: https://git.openjdk.org/jdk/pull/30194#discussion_r3146048262

Reply via email to