stub uses interface's throws clause, not class's

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.2.0
    • Affects Version/s: 1.1
    • Component/s: core-libs
    • None
    • 1.2beta2
    • sparc
    • solaris_2.5.1
    • Not verified

      The following code should work but the stub won't compile because rmic generates a throws clause from one of the interfaces instead of using the class's throws clause which is compatible with both interfaces:

      import java.rmi.*;
       
      class MyException extends Exception { }
      class OtherException extends Exception { }
       
      interface t1 extends Remote {
          public void foo() throws MyException, RemoteException;
      }
       
      interface t2 extends Remote {
          public void foo() throws MyException, RemoteException, OtherException;
      }
       
      class tImpl implements t1, t2 {
          public void foo() {
              ;
          }
      }

            Assignee:
            Peter Jones (Inactive)
            Reporter:
            Kenneth Arnold (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: