commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cfranzen <>
Subject [GitHub] commons-lang pull request: LANG-1115 Add support for varargs in me...
Date Fri, 05 Feb 2016 16:47:28 GMT
Github user cfranzen commented on the pull request:
    I have played around a little bit with that pull request here and I think I have found
an issue with the current implementation. When building the varArgs array that will be used
in method.invoke() the method System.arraycopy() is used. Unfortunately this method will not
handle auto-(un)boxing correctly. So the following example will not work:
    class TestBean{
       public void doSomething(int... values){
    MethodUtils.invokeMethod(testBean, Integer.valueOf(1), Integer.valueOf(2));
    My expectation would be that MethodUtils is able to handle that. Not sure if my expectation
is wrong.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message