mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
prevent NPE when presenting usage warning from import statement
This commit is contained in:
@@ -81,7 +81,8 @@ abstract class ModifierIntention extends Intention {
|
||||
}
|
||||
final MultiMap<PsiElement, String> conflicts = new MultiMap();
|
||||
for (PsiElement reference : problemReferences) {
|
||||
final PsiNameIdentifierOwner context = PsiTreeUtil.getParentOfType(reference, PsiMethod.class, PsiField.class, PsiClass.class);
|
||||
final PsiElement context =
|
||||
PsiTreeUtil.getParentOfType(reference, PsiMethod.class, PsiField.class, PsiClass.class, PsiFile.class);
|
||||
conflicts.putValue(reference, RefactoringUIUtil.getDescription(member, false) +
|
||||
" with " + getModifier() + " visibility won't be accessible from " +
|
||||
RefactoringUIUtil.getDescription(context, true));
|
||||
|
||||
Reference in New Issue
Block a user