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

Turn @ParametricNullness into a no-op for Kotlin and IntelliJ, and reduce its retention to CLASS. #7569

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

copybara-service[bot]
Copy link
Contributor

Turn @ParametricNullness into a no-op for Kotlin and IntelliJ, and reduce its retention to CLASS.

We'll continue annotating our APIs with it for now, since it can be helpful for NullAway and perhaps other tools. (But please let us know if you are depending on it from a tool other than NullAway.)

This is the next step toward using JSpecify in Guava.

Also, I've updated the Javadoc to belatedly note that ParametricNulless isn't used by NullPointerTester anymore (as of cl/530341970).

RELNOTES=Changed @ParametricNullness into a no-op for Kotlin and IntelliJ. Before now, it was forcing many usages of type variables to have platform types, which meant that Kotlin couldn't check those usages for nullness errors. With this change, Kotlin can detect more errors.

…reduce its retention to `CLASS`.

We'll continue annotating our APIs with it for now, since it can be helpful for NullAway and perhaps other tools. (But please [let us know](https://github.com/google/guava/issues/new?template=Blank+issue) if you are depending on it from a tool other than NullAway.)

This is the next step toward [using JSpecify in Guava](jspecify/jspecify#239 (comment)).

Also, I've updated the Javadoc to belatedly note that `ParametricNulless` isn't used by `NullPointerTester` anymore (as of cl/530341970).

RELNOTES=Changed `@ParametricNullness` into a no-op for Kotlin and IntelliJ. Before now, it was forcing many usages of type variables to have [platform types](https://kotlinlang.org/docs/java-interop.html#null-safety-and-platform-types), which meant that Kotlin couldn't check those usages for nullness errors. With this change, Kotlin can detect more errors.
PiperOrigin-RevId: 708610470
@copybara-service copybara-service bot merged commit ae36f57 into master Dec 21, 2024
3 checks passed
@copybara-service copybara-service bot deleted the test_707999447 branch December 21, 2024 16:20
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.

1 participant