Integrating ErrorProne and NullAway with an Android project
Recently, with the remote help of guys from Uber in California, I integrated NullAway and ErrorProne with the one of my open-source Android projects. What is NullAway? Basically, it’s a tool to help eliminate NullPointerExceptions (NPEs) in your Java code. It detects situations where NPE could occur at the compile time. Let’s have a look at the following code: static void log(Object x) { System.out.println(x.toString()); } static void foo() { log(null); } NullAway will find out that we’re passing null and we’ll get appropriate error message:...