MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1eqgk9g/jspecify_100_and_nullability_in_java/lhuutly/?context=3
r/programming • u/benevanstech • Aug 12 '24
4 comments sorted by
View all comments
2
Out of curiosity, does this let you annotate a class as "not-nullable by default"? For me, a big disadvantage of nullable annocations is that you basically have to mark everything as @NotNull, which turns out to a big pain.
Will this be compatible with https://bugs.openjdk.org/browse/JDK-8303099 ?
1 u/alkorith Aug 13 '24 Use the @NullMarked annotation to mark a class as non-null by default. See: https://jspecify.dev/docs/api/org/jspecify/annotations/NullMarked.html
1
Use the @NullMarked annotation to mark a class as non-null by default. See: https://jspecify.dev/docs/api/org/jspecify/annotations/NullMarked.html
@NullMarked
2
u/setoid Aug 13 '24
Out of curiosity, does this let you annotate a class as "not-nullable by default"? For me, a big disadvantage of nullable annocations is that you basically have to mark everything as @NotNull, which turns out to a big pain.
Will this be compatible with https://bugs.openjdk.org/browse/JDK-8303099 ?