JDK-8226540 : Tighten spec around class loading/resolving/linking
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:class_loading
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2019-06-20
  • Updated: 2020-03-09
  • Resolved: 2020-03-09
Related Reports
Relates :  
Relates :  
Description
We've come across some ambiguity and inconsistencies with respect to the following methods where it regards class linking/resolution:

Class.forName()
ClassLoader.loadClass()
ClassLoader.resolveClass()
JNI FindClass()

Comments
The ClassLoader methods are still an issue. ClassLoader.resolveClass is supposed to link a class but is a no-op.
09-03-2020

I'm not aware of any more issue to follow up. This issue should be closed.
09-03-2020

What specific needs to be done for this issue?
02-12-2019

The JNI issue should be handled by a separate hotspot bug. I suspect we will change the spec to match the implementation. Upadate: I filed JDK-8230685
06-09-2019

One example: JNI FindClass will initialize the class in question (by passing true for the 'init' arg to find_class_from_class_loader()), though is not specified to do so.
05-09-2019