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

      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.

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

              Created:
              Updated:
              Resolved: