The solution is pretty straightforward, in so far as just add a check for null. But there is a subtle problem, in that if the target has overloaded methods, eg:
public void foo(String);
public void foo(Icon);
It's non-deterministic as to which method will be invoked. The reason that happens is that null will match either of these methods.
It's possible we could try and figure out the return type based on the Method signature and look for the method based on that, but that isn't foolproof in so far as if the return type is typed to Object either method will match. Similarly you might not be able to resolve the method depending upon where null is returned.
For those reasons we're going with the simple fix and will discourage people from targetting a class with overloaded methods.
###@###.### 10/14/04 17:35 GMT