mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: avoid IOE (EA-139295)
This commit is contained in:
+1
-1
@@ -656,7 +656,7 @@ public class JavaMatchingVisitor extends JavaElementVisitor {
|
||||
if (typeElement.isInferredType()) {
|
||||
// replace inferred type with explicit type if possible
|
||||
final PsiType type = typeElement.getType();
|
||||
if (type == PsiType.NULL) {
|
||||
if (type == PsiType.NULL || type instanceof PsiLambdaParameterType) {
|
||||
return typeElement;
|
||||
}
|
||||
final String canonicalText = type.getCanonicalText();
|
||||
|
||||
+9
@@ -2356,6 +2356,15 @@ public class StructuralSearchTest extends StructuralSearchTestCase {
|
||||
" };\n" +
|
||||
"}";
|
||||
assertEquals("match statement body correctly", 1, findMatchesCount(source2, pattern7));
|
||||
|
||||
String source3 = "class LambdaParameter {\n" +
|
||||
"\n" +
|
||||
" void x() {\n" +
|
||||
" Runnable r = (var a) -> a = \"\";\n" +
|
||||
" }\n" +
|
||||
"}";
|
||||
String pattern8 = "String '_x;";
|
||||
assertEquals("avoid IncorrectOperationException", 0, findMatchesCount(source3, pattern8));
|
||||
}
|
||||
|
||||
public void testFindDefaultMethods() {
|
||||
|
||||
Reference in New Issue
Block a user