Fixme missing if and add throw on mismatch.

This commit is contained in:
Willem Cazander 2012-09-28 00:49:27 +02:00
parent 7eba34a510
commit aebe8a24d3

View file

@ -72,6 +72,9 @@ public class ElementRefectionBindingHandler extends AbstractElementBindingHandle
if (types.length > 1) {
continue;
}
if (method.equalsIgnoreCase(m.getName())==false) {
continue;
}
if (types[0].isAssignableFrom(childClass)) {
try {
m.invoke(parentObject, childObject);
@ -81,6 +84,7 @@ public class ElementRefectionBindingHandler extends AbstractElementBindingHandle
return;
}
}
throw new ElementBindingHandlerException("Could not find method: "+method+" on: "+childClass+" id:"+getId());
}
/**