Description
There are a handful of API classes in RMI that are unused or obsolete. Some are already even documented as being obsolete. These classes may have been exported to the public API by mistake, they may have been made public solely for use by implementation classes, or the system may have been refactored to remove its use of these classes, leaving them unused or obsolete. These classes should be deprecated.
This change consists solely of deprecation, specification changes, and clarifications. There are no functional changes proposed.
The following classes are to be deprecated:
* java.rmi.RMISecurityManager
This class is documented as being obsolete, and it recommends using SecurityManager instead. It is an empty subclass of java.lang.SecurityManager, so it is functionally identical to SecurityManager. It's mentioned in ActivationGroup, but this is actually erroneous, as the Activation system already uses SecurityManager instead of RMISecurityManager. There are a few places around the library that use RMISecurityManager, but these will be cleaned up later.
* java.rmi.server.ServerRef
This interface is not used anywhere in the public API. That is, nothing in the public API consumes a ServerRef as a parameter, returns one as a value, implements it, or exposes it as a field. It is implemented by one private implementation class, sun.rmi.server.UnicastServerRef, but this is effectively a no-op, since the ServerRef interface type is not actually mentioned anywhere else in the implementation.
* java.rmi.server.SocketSecurityException
This exception is documented as being obsolete, and it recommends using ExportException instead. It is never thrown anywhere. There is one place in JNDI where it is caught, but of course this is a no-op since it's never thrown.
This change consists solely of deprecation, specification changes, and clarifications. There are no functional changes proposed.
The following classes are to be deprecated:
* java.rmi.RMISecurityManager
This class is documented as being obsolete, and it recommends using SecurityManager instead. It is an empty subclass of java.lang.SecurityManager, so it is functionally identical to SecurityManager. It's mentioned in ActivationGroup, but this is actually erroneous, as the Activation system already uses SecurityManager instead of RMISecurityManager. There are a few places around the library that use RMISecurityManager, but these will be cleaned up later.
* java.rmi.server.ServerRef
This interface is not used anywhere in the public API. That is, nothing in the public API consumes a ServerRef as a parameter, returns one as a value, implements it, or exposes it as a field. It is implemented by one private implementation class, sun.rmi.server.UnicastServerRef, but this is effectively a no-op, since the ServerRef interface type is not actually mentioned anywhere else in the implementation.
* java.rmi.server.SocketSecurityException
This exception is documented as being obsolete, and it recommends using ExportException instead. It is never thrown anywhere. There is one place in JNDI where it is caught, but of course this is a no-op since it's never thrown.
Attachments
Issue Links
- relates to
-
JDK-4109119 deprecated methods/interfaces should be marked as such
-
- Closed
-
-
JDK-8023862 deprecate HTTP proxying from RMI
-
- Resolved
-
-
JDK-8023863 deprecate support for statically-generated stubs from RMI (JRMP)
-
- Resolved
-