JDK-8129499 : Structure of java/rmi/activation/rmidViaInheritedChannel tests masks exception
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2015-06-22
  • Updated: 2016-06-13
  • Resolved: 2015-06-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 9
9 b71Fixed
Related Reports
Blocks :  
Duplicate :  
Description
These tests

java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java
java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java 

fail with a NullPointerException when attempting to dereference the rmid instance variable. This is due to this structure

        RMID rmid = null;
        try {
            System.err.println("export callback object and bind in registry");

            // bind to the registry (code omitted)

            System.err.println("start rmid with inherited channel");
            rmid = RMID.createRMID( ... );

            // more code omitted
        } finally {
            if (obj != null) {
                UnicastRemoteObject.unexportObject(obj, true);
            }
            rmid.cleanup(); // <--- line where the exception occurs
        }

where the error actually occurs between the print statements.