-
Bug
-
Resolution: Fixed
-
P4
-
None
-
None
-
b29
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085689 | emb-9 | Attila Szegedi | P4 | Resolved | Fixed | team |
JDK-8064196 | 8u45 | Attila Szegedi | P4 | Resolved | Fixed | b01 |
JDK-8056145 | 8u40 | Attila Szegedi | P4 | Resolved | Fixed | b04 |
JDK-8070433 | emb-8u47 | Attila Szegedi | P4 | Resolved | Fixed | team |
As reported by Tal Liron at http://mail.openjdk.java.net/pipermail/nashorn-dev/2014-August/003307.html
The following program will cause an exception when "isEmpty2" is called:
Error: java.lang.ClassCastException: java.lang.String cannot be cast to jdk.nashorn.internal.runtime.Undefined
The only difference between isEmpty1 and isEmpty2 is the actual use of "k". If "k" is not referenced, the exception happens.
function isEmpty1(v) {
for (var k in v) {
print(v[k]+'\n')
return false
}
return true
}
function isEmpty2(v) {
for (var k in v) {
return false
}
return true
}
x = {test: 'test'}
isEmpty1(x)
isEmpty2(x)
The following program will cause an exception when "isEmpty2" is called:
Error: java.lang.ClassCastException: java.lang.String cannot be cast to jdk.nashorn.internal.runtime.Undefined
The only difference between isEmpty1 and isEmpty2 is the actual use of "k". If "k" is not referenced, the exception happens.
function isEmpty1(v) {
for (var k in v) {
print(v[k]+'\n')
return false
}
return true
}
function isEmpty2(v) {
for (var k in v) {
return false
}
return true
}
x = {test: 'test'}
isEmpty1(x)
isEmpty2(x)
- backported by
-
JDK-8056145 iteration fails if index var is not used
-
- Resolved
-
-
JDK-8064196 iteration fails if index var is not used
-
- Resolved
-
-
JDK-8070433 iteration fails if index var is not used
-
- Resolved
-
-
JDK-8085689 iteration fails if index var is not used
-
- Resolved
-