mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
do not infer @NotNull for final fields with initializer (IDEA-75616)
This commit is contained in:
@@ -150,6 +150,7 @@ public class NullityInferrer {
|
||||
final PsiModifierListOwner element = pointer.getElement();
|
||||
if (element != null) {
|
||||
if (shouldIgnore(element)) continue;
|
||||
if (element instanceof PsiField && ((PsiField)element).hasInitializer() && element.hasModifierProperty(PsiModifier.FINAL)) continue;
|
||||
new AddAnnotationFix(manager.getDefaultNotNull(), element, manager.getDefaultNullable()).invoke(project, null,
|
||||
element.getContainingFile());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user