Github user cfranzen commented on the pull request:

    https://github.com/apache/commons-lang/pull/89#issuecomment-180435170
  
    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:
    
    ```java
    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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to