For example:
Support we have a remote interface
- Code: Select all
public interface RemoteInterface extends Remote {
public void ping() throws RemoteExtension;
}
and its implementation:
- Code: Select all
public class RemoteImplementation implements RemoteInterface {
public void ping() {
;
}
}
Notice that the implementation method ping() does not throw any exceptions.
Now if we change the remote interface and remove the "throws RemoteException" clause, like below:
- Code: Select all
public interface RemoteInterface extends Remote {
public void ping();
}
the internal java compiler will not consider it something it's worth to compile RemoteImplementation.java because of it. Therefore, the RMI plugin will not invoke the RMI compiler when the remote interface is saved, and the error (all methods in remote interfaces must throw RemoteException) will be discovered only the next time the RMI compiler runs.
It is of course possible to manually invoke the RMI compiler to regenerate all stubs in the project.
This issue will be addressed in the next version of the RMI plugin.
Genady