The current implementation of isValid() checks validity for each message type, returning true on the first valid message. At the end, it returns whatever is returned by isValidNotification(). For any message that is not of notification type, the reason returned will always be WRONG_MESSAGE_TYPE. This is not particularly helpful in diagnosing an error with a message.
Since a message can only have one type, we can assume that any reason that is not WRONG_MESSAGE_TYPE is probably the right reason the message failed validation.
The current implementation of
isValid()
checks validity for each message type, returning true on the first valid message. At the end, it returns whatever is returned byisValidNotification()
. For any message that is not of notification type, the reason returned will always beWRONG_MESSAGE_TYPE
. This is not particularly helpful in diagnosing an error with a message.Since a message can only have one type, we can assume that any reason that is not
WRONG_MESSAGE_TYPE
is probably the right reason the message failed validation.