diff options
author | Gurmeen Bindra <gurmeen.bindra@isode.com> | 2013-06-26 13:12:27 (GMT) |
---|---|---|
committer | Gurmeen Bindra <gurmeen.bindra@isode.com> | 2013-06-27 13:27:43 (GMT) |
commit | 1006276e3c78c2098d8efd5dedff0ee87e0e006f (patch) | |
tree | b3ad876f3d5bd815f45e3263f3011aede8ee3767 /src/com/isode/stroke/elements | |
parent | 7d7ecdbb01daa051472bf40e269b78c4faf7b34e (diff) | |
download | stroke-1006276e3c78c2098d8efd5dedff0ee87e0e006f.zip stroke-1006276e3c78c2098d8efd5dedff0ee87e0e006f.tar.bz2 |
Change the data type of seconds in IQ:last from int to Long
Making it Long allows it to hold an XML-unsignedLong value as well
as null values. Before this patch, it was an int and defaulted to 0.
This was not right as int is too small to hold number of seconds for
last activity time and primitive data types do not allow for null values.
Test-information:
tested using an XMPP client to query last IQ on MUC rooms
Change-Id: I6274403610bd60038fd7c235fad3bc2798f38e19
Reviewer: Kevin Smith <kevin.smith@isode.com>
Diffstat (limited to 'src/com/isode/stroke/elements')
-rw-r--r-- | src/com/isode/stroke/elements/Last.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/isode/stroke/elements/Last.java b/src/com/isode/stroke/elements/Last.java index 8f12616..b2b2805 100644 --- a/src/com/isode/stroke/elements/Last.java +++ b/src/com/isode/stroke/elements/Last.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Isode Limited, London, England. + * Copyright (c) 2011-2013, Isode Limited, London, England. * All rights reserved. */ /* @@ -10,19 +10,19 @@ package com.isode.stroke.elements; public class Last extends Payload { - int seconds_; + Long seconds_; public Last() {} - public Last(final int seconds) { + public Last(final Long seconds) { setSeconds(seconds); } - public void setSeconds(final int seconds) { + public void setSeconds(final Long seconds) { seconds_ = seconds; } - public int getSeconds() { + public Long getSeconds() { return seconds_; } } |