Facebook Engineering Blog
Retrofitting null-safety onto Java at Meta

Retrofitting null-safety onto Java at Meta

11/22/2022 · Artem Pianykh, Ilya Zorin, Dmitry Lyubarskiy

What this post added

Introduced Nullsafe, a new static analysis tool for Java that detects NullPointerException (NPE) errors. Nullsafe was integrated into the core developer workflow and used for a large-scale code transformation across millions of lines of Java code. This resulted in a 27% reduction in production NPE crashes for Instagram and improved developer productivity. The post details the technical challenges of null-safety in Java, the design of Nullsafe using AST and CFG, and its two-phase analysis (type inference and type checking).

Read the original post ↗