-
Bug
-
Resolution: Fixed
-
P3
-
9
-
None
-
b02
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8045071 | 8u25 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | b01 |
JDK-8037988 | 8u20 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | b09 |
JDK-8052471 | emb-8u26 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | b18 |
Every Error object gets a new PropertyMap after a recent change to capture stack trace @ constructor call.
var e1 = new Error()
var e2 = new Error()
print(Debug.map(e1) == Debug.map(e2))
prints false. Previously, the above evaluated to true. "nashornException" property is added to the instances at constructor. Note that previously error objects got exception property only when thrown -- at which these objects still got different PropertyMaps.
try {
throw e1
} catch (e) {
print(Debug.toIdentString(Debug.map(e)));
}
try {
throw e2
} catch (e) {
print(Debug.toIdentString(Debug.map(e)));
}
I think it is better to add nashornException as a @Property to NativeXYZError classes.
var e1 = new Error()
var e2 = new Error()
print(Debug.map(e1) == Debug.map(e2))
prints false. Previously, the above evaluated to true. "nashornException" property is added to the instances at constructor. Note that previously error objects got exception property only when thrown -- at which these objects still got different PropertyMaps.
try {
throw e1
} catch (e) {
print(Debug.toIdentString(Debug.map(e)));
}
try {
throw e2
} catch (e) {
print(Debug.toIdentString(Debug.map(e)));
}
I think it is better to add nashornException as a @Property to NativeXYZError classes.
- backported by
-
JDK-8037988 PropertyMap of Error objects is not stable
-
- Resolved
-
-
JDK-8045071 PropertyMap of Error objects is not stable
-
- Resolved
-
-
JDK-8052471 PropertyMap of Error objects is not stable
-
- Resolved
-