NullAway icon indicating copy to clipboard operation
NullAway copied to clipboard

support ParametersAreNonnullByDefault

Open msridhar opened this issue 8 years ago • 4 comments

We should look into supporting this annotation, which often appears at the package level. If calling a method in an unannotated package, we could check if a ParametersAreNonnullByDefault annotation is present, and if so do stronger checking on the parameter passing.

msridhar avatar Sep 24 '17 04:09 msridhar

We could also support MethodsAndParametersAreNonNullByDefault from javax-extras if it's easy (/cc @hzsweers)

msridhar avatar Sep 25 '17 16:09 msridhar

Supporting javax-extras should be very similar to annotations from JSR-305.

naturalwarren avatar Sep 26 '17 14:09 naturalwarren

Shouldn't it not matter? All the javax-extras annotations do is specify a TypeQualifierDefault + nullability annotation, tooling should be independent of what the source annotations are

ZacSweers avatar Sep 26 '17 15:09 ZacSweers

As additional context this is how Kotlin interprets nullability annotations from Java libraries. We might want to eventually do something similar

msridhar avatar Nov 17 '17 23:11 msridhar