On Mon, 4 May 2026 14:07:26 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 with a new target base due to a > merge or a rebase. The pull request now contains 69 commits: > > - Reshuffle examples and fix typo > - Merge branch 'master' into > implement-lazy-constants-third-prewiew-exceptions > - Merge branch 'openjdk:master' into master > - Merge master > - Merge branch 'openjdk:master' into master > - Add exampels and reinforce testing > - Restrict method and class visitbility > - Clean up and add IR tests > - Address additional comments > - Merge branch 'master' into > implement-lazy-constants-third-prewiew-exceptions > - ... and 59 more: https://git.openjdk.org/jdk/compare/3c69c969...bdf79df1 src/java.base/share/classes/java/util/Set.java line 753: > 751: * returned set. Conversely, if the membership status for element > {@code E} is > 752: * {@code false}, then {@code E} <em>is not</em> a member of the > returned set. The > 753: * returned set is an {@linkplain Collection##unmodifiable > unmodifiable} set whose Saying "element candidates are known at construction time" here is a bit confusing because, when combined with the fact that "the returned set is an unmodifiable set" seems to suggest that the elements provided to this factory become the elements of the unmodifiable set. I'd suggest to structure this differently -- e.g. 1. start by saying that this factory returns an unmodifiable set 2. the elements of such unmodifiable set are derived from the candidate members and the membership function (copy the great text you have added in this iteration -- which explains that if function returns "true", candidate is a member...) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30194#discussion_r3187813924
