j.l.i.MethodHandles.whileLoop(...) and j.l.i.MethodHandles.doWhileLoop(...) both permit body = null

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: 9
    • Component/s: core-libs
    • None

      According to specification:

      j.l.i.MethodHandles.whileLoop(MH, MH, MH)
      body - body of the loop, which may not be null.
      j.l.i.MethodHandles.doWhileLoop(MH, MH, MH)
      body - body of the loop, which may not be null.

      Actually, both methods permit body=null, moreover code from 'implementation notes' sections permits body=null too (no IllegalArgumentException).

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

      Example is attached

            Assignee:
            Michael Haupt
            Reporter:
            Anastasiya Solodkaya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: