1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-27 00:32:07 +01:00

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

View file

@ -155,6 +155,10 @@ public class PacketParserUtils {
presence.setPriority(priority); presence.setPriority(priority);
} }
catch (NumberFormatException nfe) { } 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")) { else if (elementName.equals("show")) {
presence.setMode(Presence.Mode.fromString(parser.nextText())); presence.setMode(Presence.Mode.fromString(parser.nextText()));