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

j.l.i.MethodHandles.whileLoop(...) and .iteratedLoop(...) throw unexpected exceptions in the case of 'init' return type is void

    XMLWordPrintable

Details

    Description

      According to documentation j.l.i.MethodHandles.whileLoop(MethodHandle, MethodHandle, MethodHandle), 'init' might be void:

      Passing void init function will make the loop's result type void.

      Attached code provides example which throw IllegalArgumentException; 'java.lang.IllegalArgumentException: parameter type cannot be void'


      Was found on jdk9b107, tests are in development, tck_red label will be added after tests development completion.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: