From 5ff4387f682bd04ac77f9ae04767c9c9835e924c Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 21 Nov 2017 21:05:10 +0100 Subject: [PATCH] Fix Presence.getPriority() to not return Integer.MIN_VALUE Fixes SMACK-787. --- .../src/main/java/org/jivesoftware/smack/packet/Presence.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java index 8bd7c1e0d..cc2a90e36 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java @@ -209,6 +209,9 @@ public final class Presence extends Stanza implements TypedCloneable { * @see RFC 6121 ยง 4.7.2.3. Priority Element */ public int getPriority() { + if (priority == Integer.MIN_VALUE) { + return 0; + } return priority; }