-
Type:
CSR
-
Resolution: Approved
-
Priority:
P4
-
Component/s: core-svc
-
None
-
behavioral
-
low
-
-
Java API
-
SE
Summary
ThreadInfo::from should throw IAE when the given CompositeData does
not contain all the attributes specified for ThreadInfo of a specific version.
Problem
ThreadInfo::from accepts CompositeData representing ThreadInfo of
the current and earlier release. This method intends to validate the given
CompositeData and throw IAE if it does not represent a valid ThreadInfo.
For example, lockedSynchronizers and lockedMonitors must be present
if it represents JDK 6 or 9 ThreadInfo. The spec needs clarification.
In addition while fixing this issue, stackTrace attribute represents
StackTraceElement but the spec is missing classLoaderName attribute.
Solution
Update the spec of ThreadInfo::from method to specify the release of each attribute
was defined. A valid CompositeData representing a ThreadInfo of version N
must contain all the attributes defined <= N. Same rule applies transitively to
attributes whose type or component type is CompositeType.
Specification
See attached specdiff.
- csr of
-
JDK-8198253 ThreadInfo.from(CompositeData) incorrectly accepts CompositeData with missing JDK 6 attributes
-
- Resolved
-