diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-05-02 20:39:16 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-05-02 20:39:16 +0200 |
commit | 41d726ef73a20e7e7ee1ff81c5f8326aa0e6c7d8 (patch) | |
tree | fc1b190df4275cc753bc869c7f137c0486ba2c91 /src/main/java/de/pixart/messenger/xmpp/jingle | |
parent | 419504eaecd538561307d2b10ef08bdc3a47b137 (diff) |
return InvalidJid object instead of null if Jid can not be parsed
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp/jingle')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/jingle/JingleCandidate.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleCandidate.java b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleCandidate.java index 9f163d5d9..e47b01d89 100644 --- a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleCandidate.java +++ b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleCandidate.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import de.pixart.messenger.xml.Element; +import de.pixart.messenger.xmpp.InvalidJid; import rocks.xmpp.addr.Jid; public class JingleCandidate { @@ -108,7 +109,7 @@ public class JingleCandidate { JingleCandidate parsedCandidate = new JingleCandidate( candidate.getAttribute("cid"), false); parsedCandidate.setHost(candidate.getAttribute("host")); - parsedCandidate.setJid(candidate.getAttributeAsJid("jid")); + parsedCandidate.setJid(InvalidJid.getNullForInvalid(candidate.getAttributeAsJid("jid"))); parsedCandidate.setType(candidate.getAttribute("type")); parsedCandidate.setPriority(Integer.parseInt(candidate .getAttribute("priority"))); |