Use openrewrite to enforce nullability annotations#2976
Merged
MinnDevelopment merged 1 commit intomasterfrom Dec 12, 2025
Merged
Use openrewrite to enforce nullability annotations#2976MinnDevelopment merged 1 commit intomasterfrom
MinnDevelopment merged 1 commit intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements automated enforcement of nullability annotations by migrating from JetBrains annotations to javax annotations using OpenRewrite. The migration ensures consistency across the codebase by replacing @NotNull with @Nonnull and configuring build-time validation.
- Adds OpenRewrite recipe to automatically migrate annotation types
- Configures Gradle to fail on parse errors during rewrite operations
- Updates existing code to use the standardized javax annotations
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rewrite.yml | Defines OpenRewrite recipe to migrate from JetBrains to javax annotations |
| build.gradle.kts | Activates the migration recipe and enables strict parse error handling |
| MessageSerializationTest.java | Replaces @NotNull import and usage with @Nonnull |
| PollVotersPaginationActionImpl.java | Replaces @NotNull import and usage with @Nonnull |
| ApplicationEmojiManagerImpl.java | Replaces @NotNull import and usages with @Nonnull |
| MessageCreateBuilder.java | Replaces @NotNull import and usage with @Nonnull |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MrPowerGamerBR
pushed a commit
to LorittaBot/DeviousJDA
that referenced
this pull request
Dec 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Etiquette
./gradlew formatChanges
Closes Issue: NaN
Description
This automatically replaces the NotNull/Nullable annotations with the intended ones to improve consistency. Note that you can also change your intellij settings to use the correct annotations automatically with Build, Executation, Deployment > Compiler > Configure annotations...