openhab / static-code-analysis

Maven tooling for static code analysis
https://www.openhab.org/
Other
32 stars 21 forks source link

Allow `@NonNull` on generic argument and parameter types #428

Closed wborn closed 2 years ago

wborn commented 2 years ago

When classes are annotated with @NonNullByDefault this annotation does not apply to generic argument and parameter types. With these changes the NullAnnotationsCheck allows for @NonNull annotations on generic argument and parameter types.

This fixes for instance 48 NullAnnotationsCheck false positives in openhab-core and makes it easier to find and fix real @NonNull misusages.