manolama/opentsdb — comment on commit e0b636a1fffbedee1fb36decf697f1c62017861d
File: src/tsd/JsonHelper.java line 76
By tsuna:

That is true, although I wouldn't worry about the cost of a `catch` block. There are generally many other things to worry about before looking at these super-micro-optimizations.

In this case, however, I'm not suggesting having a `catch` block. Just don't check for `null` at all. Assume the reference won't be `null`. If it is `null`, the JVM itself will automatically throw a `NullPointerException`. So no need to manually check and manually throw a `NullPointerException`, let the JVM do it for you.