mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: fix IAE (EA-100953)
This commit is contained in:
+2
-2
@@ -19,7 +19,6 @@ import com.intellij.dupLocator.util.NodeFilter;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.structuralsearch.StructuralSearchProfile;
|
||||
import com.intellij.structuralsearch.StructuralSearchUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Filter for lexical nodes
|
||||
@@ -37,7 +36,8 @@ public final class LexicalNodesFilter implements NodeFilter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accepts(@NotNull PsiElement element) {
|
||||
public boolean accepts(PsiElement element) {
|
||||
if (element == null) return false;
|
||||
final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByPsiElement(element);
|
||||
return profile != null && profile.getLexicalNodesFilter().accepts(element);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user