There is currently a draft JEP trying to address this in the language itself, but I'm very glad that the community is trying to address the nullability issue themselves in the meanwhile
It'd be awesome if @Nullable, @NullMarked, etc are also accepted as a part of the language because otherwise we will have to append ! pretty much everywhere.
I think the JEP mentions that "non-null-by-default" is still a possible follow-on feature. I personally believe it is extremely important, but also a Very Big Deal to change Java like that, and we'd have to be very very careful.
Also see my nearby comment about classfile munging. It implies that, well, yeah, a classfile munger could put !'s in everywhere based on the presence of `@NullMarked`, although that's only for the benefit of compiling dependents.
26
u/syneil86 Aug 12 '24
There is currently a draft JEP trying to address this in the language itself, but I'm very glad that the community is trying to address the nullability issue themselves in the meanwhile
https://openjdk.org/jeps/8316779