Replace JSR-305 annotations with spotbugs annotations
Changes proposed
Annotations for Nonnull, CheckForNull, and several others were proposed for Java as part of dormant Java specification request JSR-305. The proposal never became a part of standard Java.
Jenkins plugins should switch from using JSR-305 annotations to use Spotbugs annotations that provide the same semantics.
The mailing list discussion from James Nord describes the affected annotations and why they should be replaced with annotations that are actively maintained.
Replace JSR-305 annotations with spotbugs annotations
Changes proposed
Annotations for Nonnull, CheckForNull, and several others were proposed for Java as part of dormant Java specification request JSR-305. The proposal never became a part of standard Java.
Jenkins plugins should switch from using JSR-305 annotations to use Spotbugs annotations that provide the same semantics.
The mailing list discussion from James Nord describes the affected annotations and why they should be replaced with annotations that are actively maintained.
The "Improve a plugin" tutorial provides instructions to perform this change.
An OpenRewrite recipe is also available and is even better than the tutorial.
Checklist
Notify
@Waschndolos
Testing done
Confirmed that automated tests pass on Linux with Java 21.