import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; import org.jspecify.annotations.NonNull; @NullMarked public class Nullness { interface Decoder { @NonNull T decode(Object o); } static Decoder identity(T value) { return __ -> /*ca-nullable-to-not-null*/value; } public static void main() { Integer i = 3; Decoder d = identity(i); int j = d.decode(i); } }