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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 14
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: