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

MHs.iteratedLoop(...) throws unexpected WMTE, disallows Iterator subclasses, generates inconsistent loop result type

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:

      Description

      According to MethodHandles.iteratedLoop(...) documentation, it could throw IllegalArgumentException. Documentation specifies that 'conversion' mistakes could lead to runtime exceptions during loop execution (not creation).


      Attached example (IteratedLoop4) produces WrongMethodTypeException.
      iterator=null
      init=null
      body=(String,I,List)I
      Was found on jdk9b109, jdk9b110. Tests are under development, tck_red will be added after development completion.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mhaupt Michael Haupt
                Reporter:
                asolodkaya Anastasiya Solodkaya (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: