[ https://issues.apache.org/jira/browse/ARIES-2114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849662#comment-17849662 ]
ASF subversion and git services commented on ARIES-2114: -------------------------------------------------------- Commit 4f4e00a11e1bff297ac9e71a303dc97f9bdd025d in aries-rsa's branch refs/heads/master from Amichai Rothman [ https://gitbox.apache.org/repos/asf?p=aries-rsa.git;h=4f4e00a1 ] ARIES-2114 - Validate number of parameters and throw NoSuchMethodException if there is no matching method > 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 > Components: Remote Service Admin > Affects Versions: rsa-1.16.1 > Reporter: Amichai Rothman > Priority: Major > > 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)