Assume Presence priority to be zero when priority is out of range. SMACK-60

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2518 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2005-08-03 02:42:53 +00:00 committed by gaston
parent aaa723ffaf
commit 7b62abf071
1 changed files with 4 additions and 0 deletions

View File

@ -155,6 +155,10 @@ public class PacketParserUtils {
presence.setPriority(priority);
}
catch (NumberFormatException nfe) { }
catch (IllegalArgumentException iae) {
// Presence priority is out of range so assume priority to be zero
presence.setPriority(0);
}
}
else if (elementName.equals("show")) {
presence.setMode(Presence.Mode.fromString(parser.nextText()));