mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
[java-dfa] NotNull annotations
GitOrigin-RevId: 18ff1d129199bf3a85b79aafd1aa4c620fc67f7f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
82fd757f9d
commit
7be47b61b0
@@ -21,7 +21,10 @@ import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.codeInspection.dataFlow.TypeConstraints.*;
|
||||
|
||||
@@ -154,7 +157,7 @@ public sealed interface TypeConstraint permits TypeConstraint.Constrained, TypeC
|
||||
/**
|
||||
* @return a {@link DfType} that represents any object that satisfies this constraint, or null (nullability is unknown)
|
||||
*/
|
||||
default DfType asDfType() {
|
||||
default @NotNull DfType asDfType() {
|
||||
return this == BOTTOM ? DfType.BOTTOM :
|
||||
DfTypes.customObject(this, DfaNullability.UNKNOWN, Mutability.UNKNOWN, null, DfType.BOTTOM);
|
||||
}
|
||||
|
||||
@@ -26,16 +26,16 @@ public final class TypeConstraints {
|
||||
/**
|
||||
* Top constraint (no restriction; any non-primitive value satisfies this)
|
||||
*/
|
||||
public static final TypeConstraint TOP = new TopConstraint();
|
||||
public static final @NotNull TypeConstraint TOP = new TopConstraint();
|
||||
/**
|
||||
* Bottom constraint (no actual type satisfies this)
|
||||
*/
|
||||
public static final TypeConstraint BOTTOM = new BottomConstraint();
|
||||
public static final @NotNull TypeConstraint BOTTOM = new BottomConstraint();
|
||||
|
||||
/**
|
||||
* Exactly java.lang.Object class
|
||||
*/
|
||||
public static final Exact EXACTLY_OBJECT = new ExactObject();
|
||||
public static final @NotNull Exact EXACTLY_OBJECT = new ExactObject();
|
||||
|
||||
@Nullable
|
||||
private static Exact createExact(@NotNull PsiType type) {
|
||||
|
||||
Reference in New Issue
Block a user