RFR JDK-8198253: ThreadInfo.from(CompositeData) assigning fields incorrectly in JDK 9

Jeremy Manson jeremymanson at google.com
Tue Feb 27 17:56:11 UTC 2018


Comment on new doc wording:


* A {@code CompositeData} representing a {@code ThreadInfo} of
* version <em>N</em> must contain all the attributes defined
* since <em>N</em> or earlier unless specified otherwise.

Wouldn't "all of the attributes defined since N or earlier" just mean "all
of the attributes"?  "Since" is basically the same as "after".  Would "must
contain all of the attributes for every version up to and including N" work?

Jeremy

On Mon, Feb 26, 2018 at 8:20 PM, mandy chung <mandy.chung at oracle.com> wrote:

> CSR: https://bugs.openjdk.java.net/browse/JDK-8198732
>
> Can you please review?
>
> Mandy
>
> On 2/23/18 4:50 PM, mandy chung wrote:
>
> Webrev at:
>   http://cr.openjdk.java.net/~mchung/jdk11/webrevs/8198253/webrev.01
>
> This patch updates the spec to clarify what attributes are required
> since which release.  There is a spec bug that "classLoaderName"
> added in JDK 9 is missing in the CompositeData for StackTraceElement
> but the implementation is correct.  I will file a CSR for this update.
>
> This patch ensures that CompositeData for ThreadInfo of version N
> must have the attributes defined since <= N.
> ThreadInfo::from also makes sure 'stackTrace' and 'lockedMonitors'
> attributes of version N while it can include additional attributes
> which has been the current behavior.
>
> JDK-8139587 intended to support older versions of StackTraceElement
> which does not seem a complete solution.  I reverted the fix for
> JDK-8139587 (mostly) and removed TypeVersionMapper.  The fix constructs
> the CompositeType for ThreadInfo and MonitorInfo of different
> versions and used them for validation.  Minor cleanup: the static
> final variables are renamed to all capitals.  CompatibilityTest.java
> test is missing the copyright header.
>
> thanks
> Mandy
> [1] http://cr.openjdk.java.net/~mchung/jdk11/webrevs/8198253/api/java/lang/management/ThreadInfo.html#from(javax.management.openmbean.CompositeData)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180227/b8051cea/attachment.html>


More information about the serviceability-dev mailing list