Nashorn - finally clause executed twice

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 8u31, 8u40
    • Component/s: core-libs
    • x86
    • windows_8
    • Verified

      FULL PRODUCT VERSION :
      java version "1.8.0_31"
      Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.3.9600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Output of "jjs -version":
      nashorn 1.8.0_31

      A DESCRIPTION OF THE PROBLEM :
      In Nashorn, the "finally" clause of a try-finally statement is sometimes executed twice (cf. steps to reproduce for an example).

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      At the command line, do:
      >jjs
      jjs> try { for(;;) { break; } } finally { print("X"); }

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      jjs> try { for(;;) { break; } } finally { print("X"); }
      X
      jjs>
      ACTUAL -
      jjs> try { for(;;) { break; } } finally { print("X"); }
      X
      X
      jjs>

      REPRODUCIBILITY :
      This bug can be reproduced always.

            Assignee:
            Pardeep Sharma
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: