mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
EA-64632 (NPE: JavaMatchingVisitor.matchType)
This commit is contained in:
+6
-5
@@ -740,18 +740,19 @@ public class JavaMatchingVisitor extends JavaElementVisitor {
|
||||
|
||||
PsiElement[] typeparams = null;
|
||||
if (el2 instanceof PsiJavaCodeReferenceElement) {
|
||||
typeparams = ((PsiJavaCodeReferenceElement)el2).getParameterList().getTypeParameterElements();
|
||||
final PsiReferenceParameterList parameterList = ((PsiJavaCodeReferenceElement)el2).getParameterList();
|
||||
if (parameterList != null) {
|
||||
typeparams = parameterList.getTypeParameterElements();
|
||||
}
|
||||
}
|
||||
else if (el2 instanceof PsiTypeParameter) {
|
||||
el2 = ((PsiTypeParameter)el2).getNameIdentifier();
|
||||
}
|
||||
else if (el2 instanceof PsiClass && ((PsiClass)el2).hasTypeParameters()
|
||||
) {
|
||||
else if (el2 instanceof PsiClass && ((PsiClass)el2).hasTypeParameters()) {
|
||||
typeparams = ((PsiClass)el2).getTypeParameters();
|
||||
el2 = ((PsiClass)el2).getNameIdentifier();
|
||||
}
|
||||
else if (el2 instanceof PsiMethod && ((PsiMethod)el2).hasTypeParameters()
|
||||
) {
|
||||
else if (el2 instanceof PsiMethod && ((PsiMethod)el2).hasTypeParameters()) {
|
||||
typeparams = ((PsiMethod)_type2).getTypeParameters();
|
||||
el2 = ((PsiMethod)_type2).getNameIdentifier();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user