Retrofitting null-safety onto Java at Meta
We&#x27;ve been using `@Nullable` as Meta does in our code base for many years now (everything else is assumed to be non-null). Initially, we had CheckerFramework actually doing the checks at compile time... but eventually had to remove it because it&#x27;s unstable, slow, has not kept up with Java evolution (we&#x27;re on JDK 17, I think Checker still barely works on JDK 11) and also, because our IDE can be configured to flag errors on `probable nullability issue`! That was really a boon for us... it costs nothing at compile time and it&#x27;s pretty easy to not mess up as the IDE keeps us in check whenever we make any change.<p>At the same time, we have adopted Kotlin as well. Interestingly, most of our developers prefer to stay on Java... not because they love Java, but because of familiarity and that they seem to think it&#x27;s &quot;good enough&quot;.<p>Anyway, we haven&#x27;t had a large rate of NPEs for a very long time and when one actually happens in the wild we&#x27;re extremely surprised!<p>That said: looking forward to the specification[1] that&#x27;s being cooked up as Java absolutely should have had this a long time ago (as mentioned in the post).<p>[1] <a href="https:&#x2F;&#x2F;jspecify.dev&#x2F;docs&#x2F;start-here" rel="nofollow">https:&#x2F;&#x2F;jspecify.dev&#x2F;docs&#x2F;start-here</a>