From 0b8032dbd6f1fdd38e15779454b8d9581e5ee5ef Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Thu, 27 Nov 2014 10:26:34 +0100 Subject: use getAttributeAsJid method --- src/main/java/eu/siacs/conversations/parser/MessageParser.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index ce2103dc..e2028c7b 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -319,12 +319,7 @@ public class MessageParser extends AbstractParser implements } } else if (packet.hasChild("x", "jabber:x:conference")) { Element x = packet.findChild("x", "jabber:x:conference"); - Jid jid; - try { - jid = Jid.fromString(x.getAttribute("jid")); - } catch (InvalidJidException e) { - jid = null; - } + Jid jid = x.getAttributeAsJid("jid"); String password = x.getAttribute("password"); if (jid != null) { Conversation conversation = mXmppConnectionService -- cgit v1.2.3