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
1 changed files with 3 additions and 0 deletions

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;
}