j.l.i.MethodHandles: 'example' section in whileLoop(...) provides example for doWhileLoop

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: None
    • Component/s: core-libs

      Please, observe 'example' section for j.l.i.MethodHandles.whileLoop(...)

      The example uses MethodHandles.doWhileLoop(...):
      MethodHandle loop = MethodHandles.doWhileLoop(MH_initZip, MH_zipStep, MH_zipPred);

      Changing 'doWhileLoop' to 'whileLoop' leads to IAE because whileLoop and doWhileLoop have different arguments order. Changing arguments order to

      MethodHandle loop = MethodHandles.whileLoop(MH_initZip, MH_zipPred, MH_zipStep);

      resolves problem.

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

              Created:
              Updated:
              Resolved: