@@ -24,7 +24,9 @@ internal class FieldResolverScanner(val options: SchemaParserOptions) {
24
24
private val log = LoggerFactory .getLogger(FieldResolverScanner ::class .java)
25
25
26
26
fun getAllMethods (type : JavaType ) =
27
- (type.unwrap().declaredMethods.toList() + ClassUtils .getAllSuperclasses(type.unwrap()).flatMap { it.methods.toList() })
27
+ (type.unwrap().declaredMethods.toList()
28
+ + ClassUtils .getAllInterfaces(type.unwrap()).flatMap { it.methods.toList() }
29
+ + ClassUtils .getAllSuperclasses(type.unwrap()).flatMap { it.methods.toList() })
28
30
.asSequence()
29
31
.filter { ! it.isSynthetic }
30
32
.filter { ! Modifier .isPrivate(it.modifiers) }
@@ -70,7 +72,7 @@ internal class FieldResolverScanner(val options: SchemaParserOptions) {
70
72
}
71
73
}
72
74
73
- if (java.util.Map ::class .java.isAssignableFrom(search.type.unwrap())) {
75
+ if (java.util.Map ::class .java.isAssignableFrom(search.type.unwrap())) {
74
76
return PropertyMapResolver (field, search, options, search.type.unwrap())
75
77
}
76
78
@@ -116,7 +118,8 @@ internal class FieldResolverScanner(val options: SchemaParserOptions) {
116
118
}
117
119
118
120
val methodParameterCount = method.kotlinFunction?.valueParameters?.size ? : method.parameterCount
119
- val methodLastParameter = method.kotlinFunction?.valueParameters?.lastOrNull()?.type?.javaType ? : method.parameterTypes.lastOrNull()
121
+ val methodLastParameter = method.kotlinFunction?.valueParameters?.lastOrNull()?.type?.javaType
122
+ ? : method.parameterTypes.lastOrNull()
120
123
121
124
val correctParameterCount = methodParameterCount == requiredCount ||
122
125
(methodParameterCount == (requiredCount + 1 ) && allowedLastArgumentTypes.contains(methodLastParameter))
0 commit comments