Skip to content

[Java] Start adding JSpecify nullability/nullness annotations #37286

@lidavidm

Description

@lidavidm

Describe the enhancement requested

We should add nullability/nullness annotations to help users of our APIs (and us as developers) get better IDE and static analysis feedback. The roadblock has been that the 'old' standard, under javax, isn't suitable for modular Java libraries. JSpecify is intended to supersede it, and recently has declared themselves ready for early usage: https://github.com/jspecify/jspecify/wiki/adoption

We should annotate some core APIs and see how it works out.

Component(s)

Java

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions