Amichai Rothman created ARIES-2114:
--------------------------------------
Summary: TCP provider doesn't validate the number of parameters
Key: ARIES-2114
URL: https://issues.apache.org/jira/browse/ARIES-2114
Project: Aries
Issue Type: Bug
Reporter: Amichai Rothman
When searching for a matching method to invoke, The TCP provider's
MethodInvoker doesn't validate that the number of method parameters and number
of given parameters are equal. If there are too few parameters passed, it will
throw an ArrayIndexOutOfBoundsException. If too many parameters are passed, it
will proceed to call method.invoke() on the non-matching method, which will
throw an IllegalArgumentException. If there are overloaded methods with
different number of compatible parameters, depending on which it matches first,
it will either do the former or the latter with the wrong overloaded method.
btw, if a matching method cannot be found, it should probably throw the more
intuitive NoSuchMethodException instead of the other less consistent exceptions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)