[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2016-04-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15255463#comment-15255463
 ] 

ASF GitHub Bot commented on LANG-1115:
--

Github user asfgit closed the pull request at:

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


> Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
> -
>
> Key: LANG-1115
> URL: https://issues.apache.org/jira/browse/LANG-1115
> Project: Commons Lang
>  Issue Type: Improvement
>  Components: lang.reflect.*
>Reporter: Joe Ferner
>Assignee: Charles Honton
>Priority: Minor
> Fix For: Review Patch, 3.5
>
> Attachments: LANG-1115.patch
>
>
> Currently when calling methods such as 
> MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
> It would be nice if by calling getMatchingAccessibleMethod with arguments 
> that the java compiler would normally match with a vararg method would be 
> matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2016-02-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15134440#comment-15134440
 ] 

ASF GitHub Bot commented on LANG-1115:
--

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.


> Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
> -
>
> Key: LANG-1115
> URL: https://issues.apache.org/jira/browse/LANG-1115
> Project: Commons Lang
>  Issue Type: Improvement
>  Components: lang.reflect.*
>Reporter: Joe Ferner
>Assignee: Benedikt Ritter
>Priority: Minor
> Fix For: Review Patch, 3.5
>
> Attachments: LANG-1115.patch
>
>
> Currently when calling methods such as 
> MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
> It would be nice if by calling getMatchingAccessibleMethod with arguments 
> that the java compiler would normally match with a vararg method would be 
> matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2015-07-16 Thread Jim Lloyd (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14630020#comment-14630020
 ] 

Jim Lloyd commented on LANG-1115:
-

Hi [~britter], thanks for the reply. It's good to know that this feature is 
still on your roadmap. I'm not blocked by this feature not being integrated, I 
just want to make sure that we can eventually use an official release of 
commons-lang instead of our patched fork. But can I ask you to assign this 
issue to yourself so that it will appear in your queue? Thanks, Jim.

 Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
 -

 Key: LANG-1115
 URL: https://issues.apache.org/jira/browse/LANG-1115
 Project: Commons Lang
  Issue Type: Improvement
  Components: lang.reflect.*
Reporter: Joe Ferner
Priority: Minor
 Fix For: Review Patch, 3.5

 Attachments: LANG-1115.patch


 Currently when calling methods such as 
 MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
 It would be nice if by calling getMatchingAccessibleMethod with arguments 
 that the java compiler would normally match with a vararg method would be 
 matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2015-07-16 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14629688#comment-14629688
 ] 

Benedikt Ritter commented on LANG-1115:
---

Hello [~jimlloyd-sf], sorry that I haven't  responded. Yes I do want to 
integrate this feature, but I simply have no spare time at the moment to work 
on lang :-( Be sure that I'll come back to you when I have more time again.

 Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
 -

 Key: LANG-1115
 URL: https://issues.apache.org/jira/browse/LANG-1115
 Project: Commons Lang
  Issue Type: Improvement
  Components: lang.reflect.*
Reporter: Joe Ferner
Priority: Minor
 Fix For: Review Patch, 3.5

 Attachments: LANG-1115.patch


 Currently when calling methods such as 
 MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
 It would be nice if by calling getMatchingAccessibleMethod with arguments 
 that the java compiler would normally match with a vararg method would be 
 matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2015-06-02 Thread Jim Lloyd (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14570240#comment-14570240
 ] 

Jim Lloyd commented on LANG-1115:
-

Hi [~britter], have you had a chance to look at this?

 Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
 -

 Key: LANG-1115
 URL: https://issues.apache.org/jira/browse/LANG-1115
 Project: Commons Lang
  Issue Type: Improvement
  Components: lang.reflect.*
Reporter: Joe Ferner
Priority: Minor
 Fix For: Review Patch, 3.5

 Attachments: LANG-1115.patch


 Currently when calling methods such as 
 MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
 It would be nice if by calling getMatchingAccessibleMethod with arguments 
 that the java compiler would normally match with a vararg method would be 
 matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2015-05-18 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14547608#comment-14547608
 ] 

Benedikt Ritter commented on LANG-1115:
---

[~jimlloyd-sf], thank you! I will have a look later this week.

 Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
 -

 Key: LANG-1115
 URL: https://issues.apache.org/jira/browse/LANG-1115
 Project: Commons Lang
  Issue Type: Improvement
  Components: lang.reflect.*
Reporter: Joe Ferner
Priority: Minor
 Fix For: Review Patch, 3.5

 Attachments: LANG-1115.patch


 Currently when calling methods such as 
 MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
 It would be nice if by calling getMatchingAccessibleMethod with arguments 
 that the java compiler would normally match with a vararg method would be 
 matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2015-05-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14546382#comment-14546382
 ] 

ASF GitHub Bot commented on LANG-1115:
--

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**.



 Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
 -

 Key: LANG-1115
 URL: https://issues.apache.org/jira/browse/LANG-1115
 Project: Commons Lang
  Issue Type: Improvement
  Components: lang.reflect.*
Reporter: Joe Ferner
Priority: Minor
 Fix For: Review Patch

 Attachments: LANG-1115.patch


 Currently when calling methods such as 
 MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
 It would be nice if by calling getMatchingAccessibleMethod with arguments 
 that the java compiler would normally match with a vararg method would be 
 matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2015-05-15 Thread Jim Lloyd (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14546376#comment-14546376
 ] 

Jim Lloyd commented on LANG-1115:
-

Hello [~britter], I have been collaborating with [~joeferner] on this patch. I 
have a just submitted https://github.com/apache/commons-lang/pull/89 which I 
believe addresses your feedback. I'll replicated the PR comment here:

{quote}
@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. 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.
{quote}


 Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
 -

 Key: LANG-1115
 URL: https://issues.apache.org/jira/browse/LANG-1115
 Project: Commons Lang
  Issue Type: Improvement
  Components: lang.reflect.*
Reporter: Joe Ferner
Priority: Minor
 Fix For: Review Patch

 Attachments: LANG-1115.patch


 Currently when calling methods such as 
 MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
 It would be nice if by calling getMatchingAccessibleMethod with arguments 
 that the java compiler would normally match with a vararg method would be 
 matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2015-05-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14546368#comment-14546368
 ] 

ASF GitHub Bot commented on LANG-1115:
--

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 jim.ll...@gmail.com
Date:   2015-05-14T15:55:03Z

Changes to tests

commit a9a60224db84941ae0e9fa7e9545022af53267ad
Author: Jim Lloyd jim.ll...@gmail.com
Date:   2015-05-14T15:56:44Z

Revise MemberUtils.getTotalTransformationCost() for varargs.

commit feef24c107ef47f3ff6f17f2b7349b999ac48e9c
Author: Jim Lloyd jim.ll...@gmail.com
Date:   2015-05-14T15:57:31Z

ConstructorUtils.java  MethodUtils.java.

commit 05c21917b5b1d2b061b35ac954f47a3651daa529
Author: Jim Lloyd jim.ll...@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 jim.ll...@gmail.com
Date:   2015-05-14T20:23:55Z

Add doc comments for getVarArgs().

commit d49c3e9ac376ddf9bfb0dad53181a44b5d7077e0
Author: Jim Lloyd jim.ll...@gmail.com
Date:   2015-05-14T22:51:07Z

Verify correct varargs arguments are received in invoked constructors.

commit 27a547094fa767c209985cdbe18b23e316c96ebe
Author: Jim Lloyd jim.ll...@gmail.com
Date:   2015-05-15T01:15:09Z

Verify correct varargs arguments are received in invoked methods.

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

Implement class MemberUtils.Executable to simplify compareParameterTypes.

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

Move and rename isMatchingMethod() to isMatchingExecutable().

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

Refactor so that Executable is private to MemberUtils.




 Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
 -

 Key: LANG-1115
 URL: https://issues.apache.org/jira/browse/LANG-1115
 Project: Commons Lang
  Issue Type: Improvement
  Components: lang.reflect.*
Reporter: Joe Ferner
Priority: Minor
 Fix For: Review Patch

 Attachments: LANG-1115.patch


 Currently when calling methods such as 
 MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
 It would be nice if by calling getMatchingAccessibleMethod with arguments 
 that the java compiler would normally match with a vararg method would be 
 matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2015-05-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14546424#comment-14546424
 ] 

ASF GitHub Bot commented on LANG-1115:
--

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**.



 Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
 -

 Key: LANG-1115
 URL: https://issues.apache.org/jira/browse/LANG-1115
 Project: Commons Lang
  Issue Type: Improvement
  Components: lang.reflect.*
Reporter: Joe Ferner
Priority: Minor
 Fix For: Review Patch

 Attachments: LANG-1115.patch


 Currently when calling methods such as 
 MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
 It would be nice if by calling getMatchingAccessibleMethod with arguments 
 that the java compiler would normally match with a vararg method would be 
 matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1115) Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils

2015-04-18 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14501515#comment-14501515
 ] 

Benedikt Ritter commented on LANG-1115:
---

Hello [~joeferner],

very nice and useful patch. I've looked through the code and here are my 
findings:
* ConstructorUtilsTest currently doesn't check whether the right arguments were 
passed to the invoked constructor of TestBean. However for a constructor taking 
varagrs, I think we should assign the passed in varargs array and compare it to 
what we passed in.
* In MemberUtils there is a long comment at the start of {{float 
getTotalTransformationCost(final Class?[] srcArgs, final Class?[] destArgs, 
boolean isVarArgs)}}. How about making this information explicit by assigning 
boolean values like {{boolean noVarArgsPassed = src.length + 1 == dest.length}}.
* Furthermore in MemberUtils, I'm not sure I like the {{isVarArgs}} flag. I 
think I would rather linke to have two separate methods.
* Can you please explain what {{Object[] getVarArgs(Object[] args, Class?[] 
methodParameterTypes)}} int MethodUtils exactly does? I don't understand the 
code :)
* Checking input varargs arguments would be good in MethodUtilsTest

Thank you!

 Add support for varargs in ConstructorUtils, MemberUtils, and MethodUtils
 -

 Key: LANG-1115
 URL: https://issues.apache.org/jira/browse/LANG-1115
 Project: Commons Lang
  Issue Type: Improvement
  Components: lang.reflect.*
Reporter: Joe Ferner
Priority: Minor
 Fix For: Review Patch

 Attachments: LANG-1115.patch


 Currently when calling methods such as 
 MethodUtils.getMatchingAccessibleMethod variable arguments are not supported. 
 It would be nice if by calling getMatchingAccessibleMethod with arguments 
 that the java compiler would normally match with a vararg method would be 
 matched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)