JDK-8027536 : rmic: add deprecation warning message when generating JRMP static stubs/skeletons
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-10-30
  • Updated: 2014-01-06
  • Resolved: 2013-12-14
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 JDK 9
8 b122Fixed 9Fixed
Related Reports
Relates :  
Description
Since using rmic to generate static stubs or skeletons has been deprecated (JDK-8023863), a warning message should be emitted if rmic is run in one of these modes.

Probably -v1.1, -v1.2, and -vcompat are the right set of modes.

A deprecation note should also be added to the usage message.

No warning should be emitted for -iiop or -idl modes, or if the -nowarn option is supplied.
Comments
Release team: Approved for fixing
11-12-2013

SQE is OK to get this fix in jdk8
11-12-2013

8-critical-request justification: This is a completion of the RMI deprecation work done in Java SE 8. The spec changes were covered by CCC request http://ccc.us.oracle.com/8023863 . Corresponding documentation changes have been made under https://bugs.openjdk.java.net/browse/JDK-8026020 . As part of CCC approval the chair recommended adding a deprecation warning message to the rmic command itself. This bug is intended to satisfy that request. The change is minor and is very low risk: it adds a bit of logic to determine when to issue the message, and it adds a localized message string, and modifies the usage message (an existing localized string). The message is: Warning: generation and use of skeletons and static stubs for JRMP is deprecated. Skeletons are unnecessary, and static stubs have been superseded by dynamically generated stubs. Users are encouraged to migrate away from using rmic to generate skeletons and static stubs. See the documentation for java.rmi.server.UnicastRemoteObject.
10-12-2013

noreg-trivial justification: This change merely emits a warning message under certain circumstances. The logic is very simple. In principle it is possible to write a test for this change, but the effort is fairly high (forking a subprocess, reading input via another thread, handling localized messages within a test). Tests also have to be maintained; I have already encountered two bugs in a similar test that checks the usage message from the "rmiregistry" command. On the other hand the value gained from such a test is quite low. This is merely a warning message, not a piece of code that affects the fundamental operation of the system.
10-12-2013

Changing this from an Enhancement to a Bug, because it's really a bug that static stub generation is deprecated, using rmic to do the generation doesn't emit any errors. One of the outcomes of the CCC review of static stub deprecation (http://ccc.us.oracle.com/8023863) was that rmic be modified to emit such a warning. Hence, this bug.
05-12-2013