RFR 8233272 : The Class.forName specification should be updated to match the long-standing implementation with respect to class linking

Brent Christian brent.christian at oracle.com
Wed Nov 13 18:37:19 UTC 2019


Recently, the 2-arg and 3-arg Class.forName() methods were updated[1] to 
perform class linking, per the specification.  However this change had 
to be reverted[2].

Instead, let's clarify the Class.forName() spec not to guarantee linking 
(outside the case of also performing initialization, of course).  This 
is the long-standing behavior.

I also have a test of the non-linking behavior; it's based on the test 
case[3] for JDK-8231924.  It fails as of 14b14 (8212117) and passes as 
of 14b22 (8233091).

Please review my webrev:

If the wording looks good, I'll fill in the Specification for the CSR[4] 
I've started.


1. https://bugs.openjdk.java.net/browse/JDK-8212117

2. https://bugs.openjdk.java.net/browse/JDK-8233091


4. https://bugs.openjdk.java.net/browse/JDK-8233554

More information about the hotspot-dev mailing list