Meta

Retrofitting null-safety onto Java at Meta

Nov 22, 2022Artem Pianykh, Ilya Zorin, Dmitry Lyubarskiy
Retrofitting null-safety onto Java at Meta
SummaryAI, from the source post

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).

More from the Facebook Engineering Blog trail