Skip to content

Conversation

@andimarek
Copy link
Member

@andimarek andimarek commented Mar 6, 2025

Following the Spring project: https://docs.spring.io/spring-framework/reference/7.0-SNAPSHOT/core/null-safety.html

this PR moves from Jetbrains annotations to the jspecify project ones: https://jspecify.dev/

This is compatible with Kotlin:

However, the compiler understands JSpecify annotations and is able to use them to make Kotlin code see null-safe types when calling into Java code. The Kotlin compiler correctly interprets @nullable and @NullMarked starting at version 1.8.20, @nonnull starting at 2.0.0, and @NullUnmarked starting in 2.0.20.

As of version 2.1.0, the Kotlin compiler emits errors by default for problems found using JSpecify nullness. To change those to warnings, pass the -Xnullability-annotations=@org.jspecify.annotations:warn flag.

From https://jspecify.dev/docs/whether/#kotlin

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

Test Results

  310 files    310 suites   46s ⏱️
3 563 tests 3 557 ✅ 6 💤 0 ❌
3 652 runs  3 646 ✅ 6 💤 0 ❌

Results for commit 2cd77b2.

@andimarek andimarek merged commit 11a2be5 into master Mar 12, 2025
2 checks passed
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