2 ms·
Annotations don't work for local variables, though. So you only get nullability checking around calling methods and accessing fields, right?
by ygra 7y ago
Annotations don't work for local variables, though. So you only get nullability checking around calling methods and accessing fields, right?
- mrighele 7y agoAnnotations 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.