
Engineering NullAway, Uber’s Open Source Tool for Android NullPointerExceptions - myhrvold
https://eng.uber.com/nullaway/
======
gregjor
I think something is wrong with the code if null pointers are a big problem in
a Java code base.

The example in the article shows a class with an exposed nullable member, and
a function outside of the class referencing the possibly null member. I know
it's an example but it's a bad practice to expose class variables like that.
The only code that should have to check for a null member should be in the
class, not scattered all over the code base. The example in the article shows
a function referencing a member of a member (x.f). This just looks like very
bad OO design and implementation to me.

Another approach is to never have null members. Use placeholder objects that
have the expected interface but do something reasonable, like logging or
reporting the error when referenced. That's better than crashing.

As an Uber user and programmer I'm wondering how the Uber mobile client is so
complex that the code has so many problems like this that you need to write
special tools just to detect them.

