Get rid of null check in ChangeMessagesUtil.addChangeMessage
There was a check to ensure that the message passed into the
aforementioned function was not null. However, it does not make sense
to have this check here because we should force the caller to enforce
that. If a message passed into this function is null, we should
instead be throwing an NPE. Thus, with this change, an NPE will be
thrown by update.putChangeMessage if the message is null instead of
the method just being a no-op.
Additionally, I added a check for null in all of the callers where
there is a possibility that the argument it would pass could be null.
Change-Id: Ib39359704db08d06e9117a55f76727b0e798c60d
2 files changed