JDK-8026427 : deprecate obsolete APIs from java.rmi
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.rmi
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-10-14
  • Updated: 2017-05-17
  • Resolved: 2013-10-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b115Fixed
Related Reports
Relates :  
Relates :  
Relates :  
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.

Comments
Initially I had thought of deprecating java.rmi.server.RemoteRef as well, but it seems entrenched within the API, even though it doesn't seem to be very useful for most RMI applications.
15-10-2013