From c0f62d4d72b5bcfbd7ac4e9ddf26e6bc4acda1ae Mon Sep 17 00:00:00 2001 From: Pierre Date: Mon, 18 Dec 2017 17:57:30 +0100 Subject: [PATCH] Suppress possible error of NullContentException on message.getContent() --- .../comunic/client/data/conversations/ConversationMessage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/conversations/ConversationMessage.java b/app/src/main/java/org/communiquons/android/comunic/client/data/conversations/ConversationMessage.java index fee1a7e..5f9ba07 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/data/conversations/ConversationMessage.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/data/conversations/ConversationMessage.java @@ -127,8 +127,9 @@ public class ConversationMessage { * * @return The content */ + @NonNull public String getContent() { - return content; + return content != null ? content : ""; } /**