RFR(S): 8191229: serviceability/jvmti/GetOwnedMonitorInfo/GetOwnedMonitorInfoTest.java fails with NoClassDefFoundError
David Holmes
david.holmes at oracle.com
Thu Dec 7 10:41:59 UTC 2017
Hi Chris,
On 7/12/2017 5:44 PM, Chris Plummer wrote:
> New webrev:
>
> https://bugs.openjdk.java.net/browse/JDK-8191229
> http://cr.openjdk.java.net/~cjplummer/8191229/webrev.01/
>
> testClass now initialized from JNI_OnLoad(), and use memset to clear
> callbacks. Also updated to use JVMTI_VERSION_9 when calling GetEnv().
71 // JNI_OnLoad has not been called yet, so can't possibly
be an instance of TEST_CLASS.
You can't be executing this method before JNI_OnLoad has executed. If
JNI_Onload has executed then you can't execute this method and find NULL
as that means JNI_Onload failed and hence library loading fails and so
you can't be executing this method. So this method reduces to a simple
instanceof check, which can go straight into the calling method.
183 if (testClass == NULL) {
That can just be "else {" - but as I said it can't be NULL anyway.
Thanks,
David
> thanks,
>
> Chris
More information about the serviceability-dev
mailing list