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

Address reliance on default constructors in java.rmi

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 16
    • core-libs
    • None
    • minimal
    • Java API
    • SE

      Summary

      Replace a default constructor in java.rmi.server.RMIClassLoaderSpi with an equivalent explicit constructor.

      Problem

      The class java.rmi.server.RMIClassLoaderSpi relies on a default constructor.

      Solution

      Add an explicit public no-arg constructor.

      Specification

      --- a/src/java.rmi/share/classes/java/rmi/server/RMIClassLoaderSpi.java Fri Jul 24 13:49:38 2020 -0700
      +++ b/src/java.rmi/share/classes/java/rmi/server/RMIClassLoaderSpi.java Fri Jul 24 19:39:48 2020 -0700
      @@ -62,6 +62,11 @@
       public abstract class RMIClassLoaderSpi {
      
           /**
      +     * Constructor for subclasses to call.
      +     */
      +    public RMIClassLoaderSpi() {}
      +
      +    /**
            * Provides the implementation for
            * {@link RMIClassLoader#loadClass(URL,String)},
            * {@link RMIClassLoader#loadClass(String,String)}, and

            darcy Joe Darcy
            darcy Joe Darcy
            Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: