-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8u31, 8u40
-
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.
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.
- duplicates
-
JDK-8030198 Nashorn: finally-block may execute twice
- Closed