jenkinsci / allure-plugin

Allure Jenkins Plugin
https://plugins.jenkins.io/allure-jenkins-plugin/
Other
84 stars 62 forks source link

Replace JSR-305 annotations with spotbugs annotations #361

Open MarkEWaite opened 2 months ago

MarkEWaite commented 2 months ago

Replace JSR-305 annotations with spotbugs annotations

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 instructions.

Testing done

Confirmed that automated tests pass on my Linux computer with Java 21 after the change.

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue