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

deprecate obsolete APIs from java.rmi



    • Enhancement
    • Resolution: Fixed
    • P3
    • 8
    • None
    • core-libs
    • b115


      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.


        Issue Links



              smarks Stuart Marks
              smarks Stuart Marks
              0 Vote for this issue
              2 Start watching this issue