[
https://issues.apache.org/jira/browse/LANG-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888411#comment-17888411
]
Václav Haisman commented on LANG-1754:
--------------------------------------
I went through the rest of the methods in {{MethodUtils}} and I did not find
any other issues like this.
{quote}I wonder if this a default method issue or an interface issue. WDYT?
{quote}
Looks like a default method issue to me.
> MethodUtils.getMatchingMethod fails to see default methods of an interface of
> a class
> -------------------------------------------------------------------------------------
>
> Key: LANG-1754
> URL: https://issues.apache.org/jira/browse/LANG-1754
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.reflect.*
> Affects Versions: 3.17.0
> Reporter: Václav Haisman
> Priority: Major
> Labels: default-methods
>
> When using {{MethodUtils.getMatchingMethod(AClass.class, "test")}} with code
> like
> {code:java}
> interface TestInterface {
> default void test() { }
> }
> class AClass implements TestInterface {
> }
> {code}
> The returned value is {{null}} because it does not look into interfaces.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)