For those who are stuck with a Java project that you can’t port to Kotlin I backported Kotlin’s null safety to Java (meta-annotation, ?. and ?:) : https://github.com/cosee/null4j
12/08/2017, 10:47 AM
There is a
the difference is that
support fields and return types?
12/08/2017, 10:50 AM
NotNullByDefault applies to everything, yes.
We experimented with having it not apply to local variables etc. but it was too confusing. Having it apply to everything means it’s just like Kotlin: “String” really means String and “@Nullable String” means String or null, no matter where “String” is actually written.