Iterator.forEachRemaining specifies that:
* <p>
* Subsequent behavior of an iterator is unspecified if the action throws an
* exception.
The primitive specializations in PrimitiveIterator derive from that same behaviour. However, they do not explicitly state that. This may mislead developers into thinking the specialized forEachRemaining methods behave differently.
* <p>
* Subsequent behavior of an iterator is unspecified if the action throws an
* exception.
The primitive specializations in PrimitiveIterator derive from that same behaviour. However, they do not explicitly state that. This may mislead developers into thinking the specialized forEachRemaining methods behave differently.
- duplicates
-
JDK-8267939 Clarify the specification of iterator and spliterator forEachRemaining
- Closed