]
Bela Ban resolved JGRP-817.
---------------------------
Resolution: Done
MethodCall: match between formal parameters and actual arguments
fails if an argument is a subtype of a parameter
-----------------------------------------------------------------------------------------------------------------
Key: JGRP-817
URL:
https://jira.jboss.org/jira/browse/JGRP-817
Project: JGroups
Issue Type: Bug
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 2.6.4, 2.7
If we have class Foo with method:
public class Foo {
public void bar(Object a, String b) {}
}
then MethodCall fails if we invoke:
dispatcher.callRemoteMethods(null, "bar", new Object[] {"hello",
"world"}, new Class[]{String.class,String.class}, ...);
because the first formal parameter of foo() is an Object and the arg a String, and we do
an equals() on the 2 classes.
Solution: use Class.isAssignableFrom(Class)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: