RFR: 8356080: Address post-integration comments for Stable Values [v3]
Luca Kellermann
duke at openjdk.org
Mon May 12 21:05:04 UTC 2025
On Mon, 12 May 2025 07:42:16 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> This PR proposes to address comments in the initial PR for Stable Values, which were deferred until after integration.
>>
>> Most of the efforts in this PR are to retain "stability" as long as possible so that views of stable collections remain stable and do not evaluate on `toString()` for example.
>>
>> Unfortunately, this PR shows the total commit history for stable values.
>
> Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 386 commits:
>
> - Address comments
> - Merge branch 'master' into jep502-followup
> - Fix an issue with toString on nested constructs
> - Merge branch 'master' into jep502-followup
> - Merge branch 'master' into jep502-followup
> - Update src/java.base/share/classes/java/lang/StableValue.java
>
> Co-authored-by: Chen Liang <liach at openjdk.org>
> - Simplify furhter
> - Address comments in PR
> - Merge master
> - Remove unused method and add comment
> - ... and 376 more: https://git.openjdk.org/jdk/compare/43008b42...a2826336
I noticed that this code will throw `NoSuchElementException` instead of `IndexOutOfBoundsException` and will swallow the message because of the `try`/`catch` in `ImmutableCollections.ListItr.next`/`previous`:
StableValue
.list(42, _ -> {throw new IndexOutOfBoundsException("important message");})
.listIterator(5)
.next(); // same for previous()
Do you plan to implement this suggestion: https://github.com/openjdk/jdk/pull/23972#discussion_r2050713377?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25004#issuecomment-2874060190
PR Comment: https://git.openjdk.org/jdk/pull/25004#issuecomment-2874062775
More information about the core-libs-dev
mailing list