JDK-8233272 : The Class.forName specification should be updated to match the long-standing implementation with respect to class linking
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:class_loading
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-10-30
  • Updated: 2024-05-17
  • Resolved: 2019-11-19
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 14
14 b24Fixed
Related Reports
CSR :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
The Class.forName(String,boolean,ClassLoader) and Class.forName(Module, String) methods have always stated that they attempt "to locate, load, and link the class or interface."  

However the long-standing implementation has not performed the linking step  (except when the 'initialize' boolean argument is 'true').

An attempt was made to bring the spec and implementation in line by always performing the prescribed linking (JDK-8212117), but this proved to be too disruptive a change (JDK-8233091).

Instead, the documentation for these methods should be updated to no longer state that linking will be performed.

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/faac483dfb30 User: bchristi Date: 2019-11-19 18:03:12 +0000
19-11-2019