1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 18:48:00 +01:00

Fix Presence.getPriority() to not return Integer.MIN_VALUE

Fixes SMACK-787.
This commit is contained in:
Florian Schmaus 2017-11-21 21:05:10 +01:00
parent 4775f350ae
commit 5ff4387f68

View file

@ -209,6 +209,9 @@ public final class Presence extends Stanza implements TypedCloneable<Presence> {
* @see <a href="https://tools.ietf.org/html/rfc6121#section-4.7.2.3">RFC 6121 § 4.7.2.3. Priority Element</a>
*/
public int getPriority() {
if (priority == Integer.MIN_VALUE) {
return 0;
}
return priority;
}