From 37730a9bfe2e31ae0d7adc9cd7247d1e15d0f6da Mon Sep 17 00:00:00 2001 From: Gurmeen Bindra Date: Fri, 2 Nov 2012 12:16:51 +0000 Subject: Fix a Null Pointer Exception when using the getSince API If since_ is null, calling clone on it was causing a NUll Pointer Exception. Adding a check fixes it. Test-information: Tested by creating a room using an XMPP client - no exception seen after the fix Change-Id: I25b151ac8e5b25562b8941eb5532fa9b9ea2de6f diff --git a/src/com/isode/stroke/elements/MUCPayload.java b/src/com/isode/stroke/elements/MUCPayload.java index 0445c56..6b52a14 100644 --- a/src/com/isode/stroke/elements/MUCPayload.java +++ b/src/com/isode/stroke/elements/MUCPayload.java @@ -110,6 +110,9 @@ public class MUCPayload extends Payload { * @return date, ca be null if not set */ public Date getSince() { + if(since_ == null) { + return null; + } return (Date)since_.clone(); } -} \ No newline at end of file +} -- cgit v0.10.2-6-g49f6