1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 22:32:06 +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. * Returns the mode of the presence update.
* A null presence mode value is interpreted to be the same thing as
* {@link Presence.Mode#available}.
* *
* @return the mode. * @return the mode.
*/ */
public Mode getMode() { public Mode getMode() {
if (mode == null) {
return Mode.available;
}
return mode; return mode;
} }