Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8267949

Clarifiy the specification of PrimitiveIterator.forEachRemaining

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 17
    • 17
    • core-libs

      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.

            psandoz Paul Sandoz
            psandoz Paul Sandoz
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: