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/xml | |
parent | 419504eaecd538561307d2b10ef08bdc3a47b137 (diff) |
return InvalidJid object instead of null if Jid can not be parsed
Diffstat (limited to 'src/main/java/de/pixart/messenger/xml')
-rw-r--r-- | src/main/java/de/pixart/messenger/xml/Element.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/xml/Element.java b/src/main/java/de/pixart/messenger/xml/Element.java index c2cb2a3b6..d9eb626d3 100644 --- a/src/main/java/de/pixart/messenger/xml/Element.java +++ b/src/main/java/de/pixart/messenger/xml/Element.java @@ -9,6 +9,7 @@ import java.util.List; import java.util.Locale; import de.pixart.messenger.utils.XmlHelper; +import de.pixart.messenger.xmpp.InvalidJid; import rocks.xmpp.addr.Jid; public class Element { @@ -151,7 +152,7 @@ public class Element { try { return Jid.ofEscaped(jid); } catch (final IllegalArgumentException e) { - return null; + return new InvalidJid(jid); } } return null; |