mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-26531 - NPE: JavaSafeDeleteProcessor$4.process
This commit is contained in:
@@ -372,9 +372,12 @@ public class JavaSafeDeleteProcessor implements SafeDeleteProcessorDelegate {
|
||||
ReferencesSearch.search(owner).forEach(new Processor<PsiReference>() {
|
||||
public boolean process(final PsiReference reference) {
|
||||
if (reference instanceof PsiJavaCodeReferenceElement) {
|
||||
PsiTypeElement[] typeArgs = ((PsiJavaCodeReferenceElement)reference).getParameterList().getTypeParameterElements();
|
||||
if (typeArgs.length > index) {
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(typeArgs[index], typeParameter, true));
|
||||
final PsiReferenceParameterList parameterList = ((PsiJavaCodeReferenceElement)reference).getParameterList();
|
||||
if (parameterList != null) {
|
||||
PsiTypeElement[] typeArgs = parameterList.getTypeParameterElements();
|
||||
if (typeArgs.length > index) {
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(typeArgs[index], typeParameter, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user