You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "viditochani (via GitHub)" <gi...@apache.org> on 2026/05/21 06:02:43 UTC
[PR] Migrate remaining modules to JSpecify null annotations [polaris]
viditochani opened a new pull request, #4517:
URL: https://github.com/apache/polaris/pull/4517
Migrates the remaining modules from Jakarta `@Nullable`/`@Nonnull` to JSpecify `@Nullable`/`@NonNull`. This completes the migration started in #4130 and #4240. After this PR, there are no Jakarta nullness annotations left in the codebase.
Part of #4124
### Changes
Mechanical import swap across runtime/service, runtime/admin, extensions, plugins, tools, and persistence/relational-jdbc. One manual fix where `@NonNull QueryGenerator.PreparedQuery` needed a short import due to TYPE_USE scoping.
Added explicit `compileOnly(libs.jspecify)` where needed and removed `jakarta.annotation.api` from modules that only used it for nullness annotations.
### Testing
Verified with `./gradlew spotlessCheck compileJava compileTestJava compileTestFixturesJava` - all pass, no warnings.
### Checklist
- [x] ๐ก๏ธ Don't disclose security issues! (contact security@apache.org)
- [x] ๐ Clearly explained why the changes are needed, or linked related issues: #4124
- [x] ๐งช Added/updated tests with good coverage, or manually tested (and explained how)
- [ ] ๐ก Added comments for complex logic
- [ ] ๐งพ Updated `CHANGELOG.md` (if needed)
- [ ] ๐ Updated documentation in `site/content/in-dev/unreleased` (if needed)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Migrate remaining modules to JSpecify null annotations [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #4517:
URL: https://github.com/apache/polaris/pull/4517#issuecomment-4519963205
I'll merge on Mon if there are no concerns from other reviewers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Migrate remaining modules to JSpecify null annotations [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b merged PR #4517:
URL: https://github.com/apache/polaris/pull/4517
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Migrate remaining modules to JSpecify null annotations [polaris]
Posted by "viditochani (via GitHub)" <gi...@apache.org>.
viditochani commented on code in PR #4517:
URL: https://github.com/apache/polaris/pull/4517#discussion_r3284699668
##########
extensions/auth/opa/impl/build.gradle.kts:
##########
@@ -51,6 +51,7 @@ dependencies {
compileOnly(project(":polaris-immutables"))
annotationProcessor(project(":polaris-immutables", configuration = "processor"))
+ compileOnly(libs.jspecify)
compileOnly(libs.jakarta.annotation.api)
Review Comment:
Yes, still needed for `@PostConstruct` and `@PreDestroy` annotations in `OpaPolarisAuthorizerFactory`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Migrate remaining modules to JSpecify null annotations [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #4517:
URL: https://github.com/apache/polaris/pull/4517#discussion_r3282361118
##########
tools/config-docs/generator/build.gradle.kts:
##########
@@ -24,6 +24,7 @@ description = "Generates Polaris reference docs"
val genTesting by configurations.creating
dependencies {
+ implementation(libs.jspecify)
Review Comment:
Why `implementation` instead of `compileOnly`?
##########
extensions/auth/opa/impl/build.gradle.kts:
##########
@@ -51,6 +51,7 @@ dependencies {
compileOnly(project(":polaris-immutables"))
annotationProcessor(project(":polaris-immutables", configuration = "processor"))
+ compileOnly(libs.jspecify)
compileOnly(libs.jakarta.annotation.api)
Review Comment:
Is `libs.jakarta.annotation.api` still used in OPA code?
##########
runtime/admin/build.gradle.kts:
##########
@@ -25,6 +25,7 @@ plugins {
}
dependencies {
+ implementation(libs.jspecify)
Review Comment:
Why `implementation` instead of `compileOnly`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Migrate remaining modules to JSpecify null annotations [polaris]
Posted by "viditochani (via GitHub)" <gi...@apache.org>.
viditochani commented on code in PR #4517:
URL: https://github.com/apache/polaris/pull/4517#discussion_r3286919272
##########
runtime/admin/build.gradle.kts:
##########
@@ -25,6 +25,7 @@ plugins {
}
dependencies {
+ implementation(libs.jspecify)
Review Comment:
Duh. The result of mechanical copy-pasting. Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org