You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by jimlloyd <gi...@git.apache.org> on 2015/05/16 01:25:37 UTC

[GitHub] commons-lang pull request: LANG-1115 Add support for varargs in me...

GitHub user jimlloyd opened a pull request:

    https://github.com/apache/commons-lang/pull/89

    LANG-1115 Add support for varargs in method utils

    @britter I have been collaborating with Joe Ferner on this contribution and have prepared this PR which I believe addresses the feedback you provided in [LANG-1115](https://issues.apache.org/jira/browse/LANG-1115). I'm not entirely sure I am following all of you contribution guidelines so please let me know if I need to resubmit. I will also add a comment to the Jira issue.
    
    FYI, the first three commits in this PR replicate the original patch submission provided by Joe. The following seven commits address your feedback.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/RedSeal-co/commons-lang LANG-1115-Add-support-for-varargs-in-method-utils

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/89.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #89
    
----
commit f68298488e0c0586b31f5e3076e4dbd60bc97835
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-14T15:55:03Z

    Changes to tests

commit a9a60224db84941ae0e9fa7e9545022af53267ad
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-14T15:56:44Z

    Revise MemberUtils.getTotalTransformationCost() for varargs.

commit feef24c107ef47f3ff6f17f2b7349b999ac48e9c
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-14T15:57:31Z

    ConstructorUtils.java & MethodUtils.java.

commit 05c21917b5b1d2b061b35ac954f47a3651daa529
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-14T19:11:58Z

    Use explicit code instead of comments to document getTotalTransformationCost for varargs cases.

commit 2e9165c9e18a4410b4174dd7bf77fa56dec73f8f
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-14T20:23:55Z

    Add doc comments for getVarArgs().

commit d49c3e9ac376ddf9bfb0dad53181a44b5d7077e0
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-14T22:51:07Z

    Verify correct varargs arguments are received in invoked constructors.

commit 27a547094fa767c209985cdbe18b23e316c96ebe
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-15T01:15:09Z

    Verify correct varargs arguments are received in invoked methods.

commit 8c9b90090f8ded74b528fa9ef127943d4e726e58
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-15T19:26:14Z

    Implement class MemberUtils.Executable to simplify compareParameterTypes.

commit 04c34e1729084ecbf18f6fabccbbdec62751745d
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-15T19:43:20Z

    Move and rename isMatchingMethod() to isMatchingExecutable().

commit 153808cba43184617078079587f34b47b56cf033
Author: Jim Lloyd <ji...@gmail.com>
Date:   2015-05-15T20:04:09Z

    Refactor so that Executable is private to MemberUtils.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang pull request: LANG-1115 Add support for varargs in me...

Posted by cfranzen <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang pull request: LANG-1115 Add support for varargs in me...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/commons-lang/pull/89


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang pull request: LANG-1115 Add support for varargs in me...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the pull request:

    https://github.com/apache/commons-lang/pull/89#issuecomment-102552615
  
    
    [![Coverage Status](https://coveralls.io/builds/2577065/badge)](https://coveralls.io/builds/2577065)
    
    Coverage decreased (-0.01%) to 93.25% when pulling **bb1ecad476c1a5c1090541690e2c0eb2a0556252 on RedSeal-co:LANG-1115-Add-support-for-varargs-in-method-utils** into **19dace1b8a2ce1734872c683bc881c420c23a1a3 on apache:master**.



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang pull request: LANG-1115 Add support for varargs in me...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the pull request:

    https://github.com/apache/commons-lang/pull/89#issuecomment-102547160
  
    
    [![Coverage Status](https://coveralls.io/builds/2576872/badge)](https://coveralls.io/builds/2576872)
    
    Coverage decreased (-0.01%) to 93.26% when pulling **153808cba43184617078079587f34b47b56cf033 on RedSeal-co:LANG-1115-Add-support-for-varargs-in-method-utils** into **19dace1b8a2ce1734872c683bc881c420c23a1a3 on apache:master**.



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---