|
@@ -967,6 +967,7 @@ public class JavaNativeModule {
|
967
|
967
|
private StoredType loadFunctionalInterface(TypeVariableContext loadContext, Class<?> cls, AnnotatedElement[] parameters) {
|
968
|
968
|
Method functionalInterfaceMethod = getFunctionalInterfaceMethod(cls);
|
969
|
969
|
TypeVariableContext context = convertTypeParameters(cls);
|
|
970
|
+ //TODO: This breaks if the functional interface type appears in the method's signature
|
970
|
971
|
FunctionHeader header = getHeader(context, functionalInterfaceMethod);
|
971
|
972
|
|
972
|
973
|
Map<TypeParameter, StoredType> mapping = new HashMap<>();
|
|
@@ -1011,7 +1012,7 @@ public class JavaNativeModule {
|
1011
|
1012
|
|
1012
|
1013
|
private Method getFunctionalInterfaceMethod(Class<?> functionalInterface) {
|
1013
|
1014
|
for (Method method : functionalInterface.getDeclaredMethods()) {
|
1014
|
|
- if (Modifier.isPublic(method.getModifiers()) && !method.isDefault())
|
|
1015
|
+ if (Modifier.isPublic(method.getModifiers()) && Modifier.isAbstract(method.getModifiers()) && !method.isDefault())
|
1015
|
1016
|
return method;
|
1016
|
1017
|
}
|
1017
|
1018
|
|