Hacker News new | ask | show | jobs
by ygra 2465 days ago
Annotations don't work for local variables, though. So you only get nullability checking around calling methods and accessing fields, right?
1 comments

Annotations in general do work for local variables, although this is specified on a per-annotation basis.

If I remember correctly, for example, the @NotNull annotation in javax.validation.constraints cannot be used for a local variable, but the one provided by the checkerframework can.