1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-29 07:22:07 +01:00

Make Presence.getMode() return available if null

This commit is contained in:
Florian Schmaus 2015-02-03 18:58:45 +01:00
parent 4013c68584
commit 5c16fdb017

View file

@ -180,13 +180,14 @@ public final class Presence extends Packet {
}
/**
* Returns the mode of the presence update, or <tt>null</tt> if the mode is not set.
* A null presence mode value is interpreted to be the same thing as
* {@link Presence.Mode#available}.
* Returns the mode of the presence update.
*
* @return the mode.
*/
public Mode getMode() {
if (mode == null) {
return Mode.available;
}
return mode;
}