mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-65747 - assert: LambdaCanBeMethodReferenceInspection.canBeMethodReferenceProblem
(cherry picked from commit 694a7b3b7869e1be50170bf6490c8b3e30328c4b)
This commit is contained in:
+2
-4
@@ -126,11 +126,9 @@ public class LambdaCanBeMethodReferenceInspection extends BaseJavaBatchLocalInsp
|
||||
}
|
||||
|
||||
final PsiMethod method = callExpression.resolveMethod();
|
||||
if (method == null) {
|
||||
LOG.error(callExpression);
|
||||
return null;
|
||||
if (method != null) {
|
||||
return MethodSignatureUtil.areSignaturesEqual((PsiMethod)element, method) ? callExpression : null;
|
||||
}
|
||||
return MethodSignatureUtil.areSignaturesEqual((PsiMethod)element, method) ? callExpression : null;
|
||||
}
|
||||
}
|
||||
finally {
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Replace with forEach" "false"
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.*;
|
||||
|
||||
class A {
|
||||
public void foo(final Set<String> strings) throws FileNotFoundException {
|
||||
for (String s : str<caret>ings) {
|
||||
new FileInputStream();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user