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()
            
StableValue
.list(42, _ -> {throw new IndexOutOfBoundsException("important message");})
.listIterator(5)
.next(); // same for previous()
- relates to
- 
                    JDK-8161558 ListIterator should not discard cause on exception -           
- Resolved
 
-