Skip to content

[Java] Remove use of jsr305 #43396

@laurentgo

Description

@laurentgo

Describe the enhancement requested

jsr305 dependency was an attempt at standardizing a set of annotations to provide semantic information regarding Java classes, methods, fields, etc.

Unfortunately the adoption has not been widespread and the dependency is not being updated, potentially causing issues with JPMS.

As some of the jsr305 annotations have equivalent within the checker framework, we could replace most of the usage of jsr305 annotations with checker annotations. The only one with no equivalent is @ThreadSafe which is only used once and could be simply removed.

Note that the same discussion is happening in multiple projects, like caffeine or guava. There is also a new standardization project named jspecify but the project only provides 4 nullability correctness annotations for now while Arrow also uses checker framework beyond just nullability correctness.

Component(s)

Java

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions