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

Jeremy Manson jeremymanson at google.com
Wed Feb 28 06:04:32 UTC 2018


I'm probably just holding it wrong. :)

Jeremy

On Tue, Feb 27, 2018 at 3:46 PM, mandy chung <mandy.chung at oracle.com> wrote:

>
>
> On 2/27/18 9:44 AM, Jeremy Manson wrote:
>
>
>
> On Mon, Feb 26, 2018 at 4:53 PM, mandy chung <mandy.chung at oracle.com>
> wrote:
>
>>
>>
>> On 2/26/18 4:23 PM, Jeremy Manson wrote:
>>
>> Hi Mandy,
>>
>> Thanks for taking this on!  I'm happy to see that you are happy to do
>> cleanups I was too timid to do (like adding the Factory in the tests).
>>
>> I note a few places in the test code where static initializers can throw
>> RuntimeExceptions.  When I ran the tests, and a static initializer threw a
>> RuntimeException, I didn't see it reflected in the output, so I had to add
>> print statements.  Was I just doing it wrong, or is that a feature of jtreg?
>>
>>
>> Do you see ExceptionInInitializerError and its cause should be
>> RuntimeException?  ExceptionInInitializerError is thrown when <clinit>
>> fails.
>>
>
> There was no relevant output.
>
>
>
> I don't see the issue.  I add "throw new RuntimeException("abc")" and
> force the exception.  I got this output:
>
> ----------System.err:(17/1008)----------
> java.lang.ExceptionInInitializerError
>         at ThreadInfoCompositeData.createGoodCompositeData(
> ThreadInfoCompositeData.java:72)
>         at ThreadInfoCompositeData.main(ThreadInfoCompositeData.java:55)
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
>         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>         at com.sun.javatest.regtest.agent.MainWrapper$MainThread.
> run(MainWrapper.java:115)
>         at java.base/java.lang.Thread.run(Thread.java:841)
> Caused by: java.lang.RuntimeException: abc
>         at ThreadInfoCompositeData$Factory.<clinit>(
> ThreadInfoCompositeData.java:317)
>         ... 8 more
>
> Mandy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180227/0f1cb512/attachment.html>


More information about the serviceability-dev mailing list