SSR: isIdentifier() parameter is nullable

This commit is contained in:
Bas Leijdekkers
2018-05-01 22:33:05 +02:00
parent e6be10e780
commit 9f7aec2cfd
4 changed files with 4 additions and 4 deletions
@@ -761,7 +761,7 @@ public class JavaStructuralSearchProfile extends StructuralSearchProfile {
}
@Override
public boolean isIdentifier(PsiElement element) {
public boolean isIdentifier(@Nullable PsiElement element) {
return element instanceof PsiIdentifier;
}
@@ -263,7 +263,7 @@ public abstract class StructuralSearchProfile {
}
@Contract("null -> false")
public boolean isIdentifier(PsiElement element) {
public boolean isIdentifier(@Nullable PsiElement element) {
return false;
}
@@ -47,7 +47,7 @@ public class XmlStructuralSearchProfile extends StructuralSearchProfile {
}
@Override
public boolean isIdentifier(PsiElement element) {
public boolean isIdentifier(@Nullable PsiElement element) {
return element instanceof XmlToken && ((XmlToken)element).getTokenType() == XmlTokenType.XML_NAME;
}
@@ -68,7 +68,7 @@ public class GroovyStructuralSearchProfile extends StructuralSearchProfileBase {
}
@Override
public boolean isIdentifier(PsiElement element) {
public boolean isIdentifier(@Nullable PsiElement element) {
return element instanceof PsiIdentifier;
}
}