JDK-8250581 : Address reliance on default constructors in java.rmi
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.rmi
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 16
  • Submitted: 2020-07-25
  • Updated: 2020-07-29
  • Resolved: 2020-07-28
Related Reports
CSR :  
Description
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


Comments
Moving to Approved.
28-07-2020