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

Structure of java/rmi/activation/rmidViaInheritedChannel tests masks exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • core-libs
    • b71
    • linux

        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.

              bpb Brian Burkhalter
              bpb Brian Burkhalter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: