Filter out methods without return type to fix EA-73795
This commit is contained in:
+2
-1
@@ -101,7 +101,8 @@ public class JavaClassImpl extends JavaClassifierImpl<PsiClass> implements JavaC
|
||||
return methods(ArraysKt.filter(getPsi().getMethods(), new Function1<PsiMethod, Boolean>() {
|
||||
@Override
|
||||
public Boolean invoke(PsiMethod method) {
|
||||
return !method.isConstructor();
|
||||
// Return type seems to be null for example for the 'clone' Groovy method generated by @AutoClone (see EA-73795)
|
||||
return !method.isConstructor() && method.getReturnType() != null;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
-5
@@ -167,11 +167,6 @@ public class JavaElementCollectionFromPsiArrayUtil {
|
||||
});
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Collection<JavaMethod> methods(@NotNull PsiMethod[] methods) {
|
||||
return convert(methods, Factories.METHODS);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Collection<JavaMethod> methods(@NotNull Iterable<PsiMethod> methods) {
|
||||
return convert(methods, Factories.METHODS);
|
||||
|
||||
Reference in New Issue
Block a user