From 7b62abf07159d4b07e3e75a1493f0dcf1ec89964 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Wed, 3 Aug 2005 02:42:53 +0000 Subject: [PATCH] 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 --- source/org/jivesoftware/smack/util/PacketParserUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/org/jivesoftware/smack/util/PacketParserUtils.java b/source/org/jivesoftware/smack/util/PacketParserUtils.java index 764d67f99..73c21ea3d 100644 --- a/source/org/jivesoftware/smack/util/PacketParserUtils.java +++ b/source/org/jivesoftware/smack/util/PacketParserUtils.java @@ -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()));