mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable propagate nullable when configured annotation is not found in classpath (IDEA-74296 )
This commit is contained in:
+6
-1
@@ -85,7 +85,12 @@ public class NullableStuffInspection extends BaseLocalInspectionTool {
|
||||
if (psiExpression.getType() == PsiType.NULL) {
|
||||
final PsiParameter parameter = parameters[i];
|
||||
if (!AnnotationUtil.isNullable(parameter) && !AnnotationUtil.isNotNull(parameter)) {
|
||||
holder.registerProblem(psiExpression, "Null is passed to parameter which is not yet @Nullable", new MyAddNullableAnnotationFix(parameter));
|
||||
final PsiClass annotationsClass =
|
||||
JavaPsiFacade.getInstance(holder.getProject()).findClass(NullableNotNullManager.getInstance(holder.getProject()).getDefaultNullable(),
|
||||
psiMethod.getResolveScope());
|
||||
if (annotationsClass != null) {
|
||||
holder.registerProblem(psiExpression, "Null is passed to parameter which is not yet @Nullable", new MyAddNullableAnnotationFix(parameter));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user