[
https://issues.apache.org/jira/browse/LANG-1782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved LANG-1782.
-----------------------------------
Fix Version/s: 3.19.0
Resolution: Fixed
[~joeferner]
Fixed in git master and snapshot builds in
https://repository.apache.org/content/repositories/snapshots/
Please verify your use case.
TY!
> getMatchingAccessibleMethod incorrectly returns null if no varargs are
> provided
> -------------------------------------------------------------------------------
>
> Key: LANG-1782
> URL: https://issues.apache.org/jira/browse/LANG-1782
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.reflect.*
> Affects Versions: 3.18.0
> Reporter: Joe Ferner
> Priority: Major
> Fix For: 3.19.0
>
>
> If I have a method
> {code:java}
> String myFunc(String... args) { ... }{code}
> and try to invoke getMatchingAccessibleMethod like this
> {code:java}
> getMatchingAccessibleMethod(MyClass.class, "myFunc"){code}
> the expected return would be myFunc but instead null is received. This
> happens because
> [https://github.com/apache/commons-lang/blob/master/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java#L336]
> incorrectly assumes at least one vararg type is passed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)