Skip to content

#19 Use JSpecify Annotations for Nullability#21

Closed
andrej-urvantsev wants to merge 1 commit into
Col-E:masterfrom
andrej-urvantsev:19-jspecify
Closed

#19 Use JSpecify Annotations for Nullability#21
andrej-urvantsev wants to merge 1 commit into
Col-E:masterfrom
andrej-urvantsev:19-jspecify

Conversation

@andrej-urvantsev

Copy link
Copy Markdown
  • Replaces jakarta nullable annotations by Jspecify
  • Bumps up gradle wrapper version

@Col-E

Col-E commented Mar 25, 2026

Copy link
Copy Markdown
Owner

Odd that the CI failed to build. There aren't any proper tests at the moment (just the demo application) but that doesn't fail the build on the current version of Gradle. Is that new default behavior with 9.X? Quick search appears to suggest so: gradle/gradle#33619

@andrej-urvantsev

Copy link
Copy Markdown
Author

Ah, yes, this should do the trick:

tasks.withType(AbstractTestTask).configureEach {
    failOnNoDiscoveredTests = false
}

I'll update PR a bit later.

@philliplbryant

Copy link
Copy Markdown

I apologize for chiming in on this late in the game. I have implemented these changes as well, but I took a slightly different approach. By adding @NullMarked to the module declaration, all fields are @NonNull unless marked with @Nullable (see https://jspecify.dev/docs/applying/).

I ran into an administrative issue with my employer that is delaying me from creating a pull request with those changes. I'd be happy to share the work if you prefer this approach and you're willing to wait a few more days while I work to resolve the admin issue with my employer?

@andrej-urvantsev

Copy link
Copy Markdown
Author

Up to @Col-E to decide I guess. I took very simple approach - drop in replacement, which should be easy to review.

@Col-E Col-E added the enhancement New feature or request label Apr 9, 2026
@andrej-urvantsev

Copy link
Copy Markdown
Author

Closing in favor of #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants