mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 00:20:55 +07:00
Revert reporting of nullableReturns in NULLABLE methods
Fixes IDEA-232076 false positive "@Nullable method 'getLeastUpperBound' always returns a non-null value" for com.intellij.psi.GenericsUtil#getLeastUpperBound(com.intellij.psi.PsiType, com.intellij.psi.PsiType, com.intellij.psi.PsiManager) GitOrigin-RevId: 5dbe43b56af2fc7ef1edb69a05a296db4af0b34b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9c4086f6e6
commit
a97a32a336
@@ -179,7 +179,7 @@ public class NullabilityProblemKind<T extends PsiElement> {
|
||||
else if (parent instanceof PsiReturnStatement) {
|
||||
targetType = PsiTypesUtil.getMethodReturnType(parent);
|
||||
}
|
||||
if (targetType != null && !PsiType.VOID.equals(targetType) && DfaPsiUtil.getTypeNullability(targetType) != Nullability.NULLABLE) {
|
||||
if (targetType != null && !PsiType.VOID.equals(targetType)) {
|
||||
if (TypeConversionUtil.isPrimitiveAndNotNull(targetType)) {
|
||||
return createUnboxingProblem(context, expression);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user