mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
NullableStuffInspectionBase: avoid reporting primitive type if annotation is inherited (IDEA-232026)
GitOrigin-RevId: 302234236e4d33882f81ed17f1cbe60ef13bea23
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e674727abc
commit
aa3c4138ae
@@ -599,7 +599,9 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
|
||||
}
|
||||
if ((notNull != null || nullable != null) && type != null && TypeConversionUtil.isPrimitive(type.getCanonicalText())) {
|
||||
PsiAnnotation annotation = notNull == null ? nullable : notNull;
|
||||
reportPrimitiveType(holder, annotation, listOwner);
|
||||
if (listOwner == null || !annotation.isPhysical() || annotation.getOwner() == listOwner.getModifierList()) {
|
||||
reportPrimitiveType(holder, annotation, listOwner);
|
||||
}
|
||||
}
|
||||
if (listOwner instanceof PsiParameter) {
|
||||
checkLoopParameterNullability(holder, notNull, nullable, DfaPsiUtil.inferParameterNullability((PsiParameter)listOwner));
|
||||
|
||||
Reference in New Issue
Block a user