Skip to content

Commit

Permalink
little fix of JcMethod.toJavaMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniilStepanov committed Nov 13, 2023
1 parent 6d9e193 commit dd92c81
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ fun TypeName.toJcClassOrInterface(jcClasspath: JcClasspath): JcClassOrInterface?

fun JcMethod.toJavaMethod(classLoader: ClassLoader): Method {
val klass = Class.forName(enclosingClass.name, false, classLoader)
return klass.methods.find { it.isSameSignatures(this) }
return (klass.methods + klass.declaredMethods).find { it.isSameSignatures(this) }
?: throw TestExecutorException("Can't find method in classpath")
}

Expand Down

0 comments on commit dd92c81

Please sign in to comment.