This is the one I want feedback on.
In Google collections, the documentation at the package level that
parameters are nonnull by default was only intended to apply to public/
protected methods. The package documentation doesn't need to document
internal methods. Furthermore, the @Nullable annotation was rarely if
ever applied to methods with private or package access.
So this was the area where I had to do the most cleanup: applying
@Nullable annotations to the appropriate parameters of private and
package methods. I had similar issues with java.util.concurrent.
The question is: Should we provide a way to specify a package level
annotation that specifies, for example, a default type qualifier
annotation for parameters of only the public and protected methods,
without specifying a default for the private and package methods.
There are lots of details, and we'd need a specific proposal for
syntax, etc. I've got some ideas, but I'm not even sure I want to
argue for the idea.
Pro: Allows specification of intent closer to common current practice
Cons: Complicates things, doesn't really take that much more work to
provide annotations for the private/package methods
Bill