JDK-8189193 : FindClass should only see classes from the boot loader called from its associated native library
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2017-10-11
  • Updated: 2020-09-01
  • Resolved: 2017-10-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10 b31Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
----------System.out:(1/19)----------
AAAAAAAAAAAAAAAAAA
----------System.err:(25/1767)----------
java.lang.RuntimeException: No EventTypes: expected false, was true
	at jdk.testlibrary.Asserts.fail(Asserts.java:540)
	at jdk.testlibrary.Asserts.assertFalse(Asserts.java:465)
	at com.oracle.jfr.jmx.security.TestEnoughPermission.main(TestEnoughPermission.java:35)
	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:844)
java.lang.RuntimeException: No EventTypes: expected false, was true
	at jdk.testlibrary.Asserts.fail(Asserts.java:540)
	at jdk.testlibrary.Asserts.assertFalse(Asserts.java:465)
	at com.oracle.jfr.jmx.security.TestEnoughPermission.main(TestEnoughPermission.java:35)
	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:844)

JavaTest Message: Test threw exception: java.lang.RuntimeException: No EventTypes: expected false, was true
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: No EventTypes: expected false, was true

Comments
New test runs successfully in nightly.
13-11-2017

URL: http://hg.openjdk.java.net/jdk10/master/rev/2493edd8b479 User: jwilhelm Date: 2017-11-04 02:58:06 +0000
04-11-2017

URL: http://hg.openjdk.java.net/jdk10/hs/rev/2493edd8b479 User: mchung Date: 2017-10-20 01:42:33 +0000
20-10-2017

It's a regression introduced by JDK-8188052. FindClass should only use system class loader when there is no caller class or when it's called from JNI_OnUnload.
18-10-2017