-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b22
-
generic
-
generic
FULL PRODUCT VERSION :
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
A DESCRIPTION OF THE PROBLEM :
All following functions return undefined, but should return "OK":
function box1() {
label: {
try {
throw 1;
}
catch (e) {
break label;
}
throw 2;
}
return 'OK';
};
function box2() {
label: {
try {
throw 1;
}
finally {
break label;
}
throw 2;
}
return 'OK';
};
function box3() {
label: {
try {
throw 1;
}
finally {
break label;
}
}
return 'OK';
};
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
A DESCRIPTION OF THE PROBLEM :
All following functions return undefined, but should return "OK":
function box1() {
label: {
try {
throw 1;
}
catch (e) {
break label;
}
throw 2;
}
return 'OK';
};
function box2() {
label: {
try {
throw 1;
}
finally {
break label;
}
throw 2;
}
return 'OK';
};
function box3() {
label: {
try {
throw 1;
}
finally {
break label;
}
}
return 'OK';
};
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-8048186 Nashorn incorrectly identifies some code as dead
- Closed
-
JDK-8187744 Labeled break in a function with throw statement causes incorrect return value
- Closed