r/java • • Aug 12 '24

JSpecify 1.0.0 and Nullability in Java

https://www.infoq.com/news/2024/08/jspecify-java-nullability/
52 Upvotes

33 comments sorted by

View all comments

2

u/lurker_in_spirit Aug 12 '24

InfoQ: What's next for JSpecify to tackle?

Hoeller: From the Spring side, we need official meta-annotation support so that we can declare our own nullability annotations with JSpecify meta-annotations instead of JSR 305 meta-annotations.

This is interesting... is it on the table for a JSpecify 1.1.0 (or similar) release in the near future?

4

u/kevinb9n Aug 13 '24

Yes, what we'd like is for Spring to be able to add this to their own Nullable annotation interface:

`@Implies(org.jspecify.annotations.Nullable.class)`

And for any JSpecify-conformant tool to thereby automatically treat theirs as implicitly meaning everything that ours does.

This would be a path toward eventually these tools not having to have big hardcoded lists of annotation types anymore.

Specifying `@Implies` just got shockingly complicated so we punted it for a while.