Description
Many functions in hbase.util.Bytes silently ignore invalid arguments.
For instance, Bytes.toInt(null) deliberately returns -1. There are tons of cases like that.
- All functions that are given a null pointer should throw an NPE.
- All functions that are given otherwise invalid arguments should throw an IllegalArgumentException.
Anyone relying on "special return values" such as -1 for Bytes.toInt(null) is guilty of writing broken code (-1 is a valid return value for toInt!).