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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: 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.

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

                Created:
                Updated:
                Resolved: