mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 02:58:00 +01:00
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
This commit is contained in:
parent
c589001cd0
commit
eb3d196bce
1 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ public class Presence extends Packet {
|
||||||
|
|
||||||
private Type type = Type.available;
|
private Type type = Type.available;
|
||||||
private String status = null;
|
private String status = null;
|
||||||
private int priority = -1;
|
private int priority = Integer.MIN_VALUE;
|
||||||
private Mode mode = null;
|
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.
|
* @return the priority.
|
||||||
*/
|
*/
|
||||||
|
@ -215,7 +215,7 @@ public class Presence extends Packet {
|
||||||
if (status != null) {
|
if (status != null) {
|
||||||
buf.append("<status>").append(StringUtils.escapeForXML(status)).append("</status>");
|
buf.append("<status>").append(StringUtils.escapeForXML(status)).append("</status>");
|
||||||
}
|
}
|
||||||
if (priority != -1) {
|
if (priority != Integer.MIN_VALUE) {
|
||||||
buf.append("<priority>").append(priority).append("</priority>");
|
buf.append("<priority>").append(priority).append("</priority>");
|
||||||
}
|
}
|
||||||
if (mode != null && mode != Mode.available) {
|
if (mode != null && mode != Mode.available) {
|
||||||
|
|
Loading…
Reference in a new issue