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() {
;
}
}
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() {
;
}
}