Suppose I have a remote GWT service method like this:
A getA();
and a corresponding async interface method:
void getA(AsyncCallback);
I will probably call this like this:
service.getA( new AsyncCallback() {
public void onSuccess( Object result ) {
A a = ( A )result;
....
}
...
} );
suppose I'm now refactoring the base method:
ADifferentA getA();
the cast in the onSuccess is now wrong, but nothing in IDEA tells me that. I believe an inspection should warn about wrong casts in cases like this one.