From eb3d196bce81df1fa6ad4dfb943b21e9d03c01ba Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Tue, 10 Apr 2007 18:44:08 +0000 Subject: [PATCH] Use Integer.MIN_VALUE as default value to indicate that no priority presence has been set. SMACK-214 git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7962 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/packet/Presence.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/org/jivesoftware/smack/packet/Presence.java b/source/org/jivesoftware/smack/packet/Presence.java index 1110ef908..f75a21eaa 100644 --- a/source/org/jivesoftware/smack/packet/Presence.java +++ b/source/org/jivesoftware/smack/packet/Presence.java @@ -60,7 +60,7 @@ public class Presence extends Packet { private Type type = Type.available; private String status = null; - private int priority = -1; + private int priority = Integer.MIN_VALUE; private Mode mode = null; /** @@ -153,7 +153,7 @@ public class Presence extends Packet { } /** - * Returns the priority of the presence, or -1 if no priority has been set. + * Returns the priority of the presence, or Integer.MIN_VALUE if no priority has been set. * * @return the priority. */ @@ -215,7 +215,7 @@ public class Presence extends Packet { if (status != null) { buf.append("").append(StringUtils.escapeForXML(status)).append(""); } - if (priority != -1) { + if (priority != Integer.MIN_VALUE) { buf.append("").append(priority).append(""); } if (mode != null && mode != Mode.available) {