RFR: 8267939: Clarify the specification of iterator and spliterator forEachRemaining [v2]

Paul Sandoz psandoz at openjdk.java.net
Wed Jun 2 22:22:55 UTC 2021


> The specification of `forEachRemaining`, accepting a primitive functional interface, on the primitive iterators is updated to be the same as for `Iterator.forEachRemaining`, specifically the following is added:
> 
> 
>      * <p>
>      * Subsequent behavior of an iterator is unspecified if the action throws an
>      * exception.
> 
> 
> In addition the specification of `tryAdvance` and `forEachRemaining` on `Spliterator` and the primitive specializations are also updated to include a similar statement:
> 
> 
>      * Subsequent behavior of a spliterator is unspecified if the action throws
>      * an exception.

Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision:

  Use source of elements.

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4290/files
  - new: https://git.openjdk.java.net/jdk/pull/4290/files/fa786a40..97d2e741

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4290&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4290&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4290.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4290/head:pull/4290

PR: https://git.openjdk.java.net/jdk/pull/4290


More information about the core-libs-dev mailing list