Hi,
I recently used Eclipse’s NonNullByDefault annotation at a package level, and I noticed it’s not checking for fields. The return type and parameters work just fine; they are null by default. But fields are not being checked even though the annotation is supposed to support FIELD
in its DefaultLocation
. I think this annotation should also check for fields, given its value can be configured to include them or not, right?
I did some digging in the code as I’m interested in contributing to SonarLint, and I found that only the Spring annotation @org.springframework.lang.NonNullFields
is checking for fields, so I opened a small Pull Request with a fix, I hope it could be helpful to address this issue
I’m looking forward to any feedback on this.
Cheers!