On Mon, 12 May 2025 07:42:16 GMT, Per Minborg <pminb...@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 <li...@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`:
> 
> ```java
> StableValue
>     .list(42, _ -> {throw new IndexOutOfBoundsException("important 
> message");})
>     .listIterator(5)
>     .next(); // same for previous()
> ```

We will take a look at this under a separate issue: 
https://bugs.openjdk.org/browse/JDK-8356842

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

PR Comment: https://git.openjdk.org/jdk/pull/25004#issuecomment-2875362328

Reply via email to