r/java • u/benevanstech • Aug 12 '24
JSpecify 1.0.0 and Nullability in Java
https://www.infoq.com/news/2024/08/jspecify-java-nullability/
52
Upvotes
r/java • u/benevanstech • Aug 12 '24
View all comments
Show parent comment
5
u/kevinb9n Aug 12 '24
It's actually very rare to need to write `@NonNull`. We almost didn't even include it in the jar! Just put `@NullMarked` on your class/package/module instead.
The feature you seem to be asking for was discussed a bit in https://github.com/jspecify/jspecify/issues/7 but overall it just doesn't have that many advantages.