Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8233272

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 14
    • None
    • core-libs

      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.

            bchristi Brent Christian
            bchristi Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: