IDEA-82125: do not override @Nullable with @NotNull in complex hierarchies

This commit is contained in:
anna
2012-07-12 14:15:21 +02:00
parent 83e1991183
commit 0f2c21ee90
3 changed files with 35 additions and 12 deletions
@@ -357,7 +357,8 @@ public class NullableStuffInspection extends BaseLocalInspectionTool {
if (!manager.isInProject(overriding)) continue;
if (!methodQuickFixSuggested
&& annotated.isDeclaredNotNull
&& !nullableManager.isNotNull(overriding, false)) {
&& !nullableManager.isNotNull(overriding, false)
&& !nullableManager.isNullable(overriding, true)) {
method.getNameIdentifier(); //load tree
PsiAnnotation annotation = AnnotationUtil.findAnnotation(method, nullableManager.getNotNulls());
final String defaultNotNull = nullableManager.getDefaultNotNull();