summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorGurmeen Bindra <gurmeen.bindra@isode.com>2012-11-02 12:16:51 (GMT)
committerGurmeen Bindra <gurmeen.bindra@isode.com>2012-11-02 15:40:40 (GMT)
commit37730a9bfe2e31ae0d7adc9cd7247d1e15d0f6da (patch)
tree70f5f890cb377ecc72338a54e8e49220eb630ecd /src/com
parente1ab207943693a5d7c31d103f538f6c859c436ff (diff)
downloadstroke-37730a9bfe2e31ae0d7adc9cd7247d1e15d0f6da.zip
stroke-37730a9bfe2e31ae0d7adc9cd7247d1e15d0f6da.tar.bz2
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
Diffstat (limited to 'src/com')
-rw-r--r--src/com/isode/stroke/elements/MUCPayload.java5
1 files changed, 4 insertions, 1 deletions
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
+}