mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
ConvertAtomicToLongAdderIntention check element is valid
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ public class ConvertAtomicToLongAdderIntention extends PsiElementBaseIntentionAc
|
||||
|
||||
@Override
|
||||
public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiElement element) {
|
||||
if (!PsiUtil.isLanguageLevel8OrHigher(element)) return false;
|
||||
if (!element.isValid() || !PsiUtil.isLanguageLevel8OrHigher(element)) return false;
|
||||
final PsiVariable variable = getVariable(element);
|
||||
return variable != null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user