Consider nullable annotations in explicit nulls #21629
Labels
area:nullability
compat:java
good first issue
Perfect for someone who wants to get started contributing
itype:enhancement
itype:question
The
@NotNull
and@NonNullable
type annotations are currently used by explicit nulls to not nullify (or add flexible type to) a reference type from Java signatures.In addition to these annotations, I suggest we also consider the
@Nullable
annotation. It indicates a value can indeed be null. In this case, we will always nullify the type (adding| Null
), instead of adding a flexible type.A list of
@Nullable
annotations we may want to consider:The text was updated successfully, but these errors were encountered: