Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Jetbrains with Jakarta annotations #482

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

snazy
Copy link
Member

@snazy snazy commented Nov 26, 2024

org.jetbrains.annotations.NotNull/Nullable -> jakarta.annotations.Nonnull/Nullable plus Guava's VisibleForTesting

The Jakarta annotations are likely better supported by validation frameworks like Hibernate Validator.

@jbonofre
Copy link
Member

NB: it's already done on Quarkus pr

@snazy
Copy link
Member Author

snazy commented Nov 26, 2024

NB: it's already done on Quarkus pr

Correct. That's where it's from - to reduce the amount of changes from that PR

@jbonofre
Copy link
Member

Love it 😀

`org.jetbrains.annotations.NotNull`/`Nullable` -> `jakarta.annotations.Nonnull`/`Nullable`
plus Guava's `VisibleForTesting`

The Jakarta annotations are likely better supported by validation frameworks like Hibernate Validator.
@eric-maynard
Copy link
Contributor

LGTM; but can we add this to the linter? I would hate to see us accidentally regress back to the wrong ones.

@@ -45,7 +45,7 @@ dependencies {
}
}

compileOnly(libs.jetbrains.annotations)
compileOnly(libs.jakarta.annotation.api)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or will the build changes make it impossible to accidentally use the wrong annotation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this

@snazy snazy merged commit 1868bbd into apache:main Nov 28, 2024
5 checks passed
@snazy snazy deleted the jakarta-annotations branch November 28, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants