[
https://issues.apache.org/jira/browse/LANG-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888267#comment-17888267
]
Gary D. Gregory commented on LANG-1754:
---------------------------------------
Hi [~wilx]
Good one! :) I wonder where else default methods are being ignored. It's been a
while since the introduction of default methods in Java 8, I'm surprised this
issue has only just come up! I wonder if this a default method issue or an
interface issue. WDYT?
> 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
>
> When using {{MethodUtils.getMatchingMethod(AClass.class, "test")}} with code
> like
> {code}
> 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)