Why sometimes the stubs are not compiled

Report bugs in the RMI plugin here

Why sometimes the stubs are not compiled

Postby genady » Sat Jan 03, 2004 8:02 pm

There are some cases in which the RMI Plugin does not correctly identify that it should compile a class. This happens when the changes that should cause the RMI compiler to be invoked do not involve a .class file change.

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
genady
Site Admin
 
Posts: 397
Joined: Sat Aug 16, 2003 5:15 pm

Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron