diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/provider/RosterPacketProvider.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/provider/RosterPacketProvider.java index fb0e378e5..1dfe98bd1 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/roster/provider/RosterPacketProvider.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/provider/RosterPacketProvider.java @@ -24,7 +24,6 @@ import org.jivesoftware.smack.roster.packet.RosterPacket; import org.jivesoftware.smack.util.ParserUtils; import org.jxmpp.jid.BareJid; import org.jxmpp.jid.impl.JidCreate; -import org.jxmpp.util.XmppStringUtils; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -51,16 +50,7 @@ public class RosterPacketProvider extends IQProvider { String jidString = parser.getAttributeValue("", "jid"); String name = parser.getAttributeValue("", "name"); - // workaround for bug in jxmpp 0.5.0-alpha5, where - // JidCreate.bareFrom(String), which we would want to use - // here, does not produce correct results - String localpart = XmppStringUtils.parseLocalpart(jidString); - BareJid jid; - if (localpart.length() != 0) { - jid = JidCreate.entityBareFrom(jidString); - } else { - jid = JidCreate.domainBareFrom(jidString); - } + BareJid jid = JidCreate.bareFrom(jidString); // Create packet. item = new RosterPacket.Item(jid, name); diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/rosterstore/DirectoryRosterStore.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/rosterstore/DirectoryRosterStore.java index d677b8d12..7fc543fe0 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/roster/rosterstore/DirectoryRosterStore.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/rosterstore/DirectoryRosterStore.java @@ -34,7 +34,6 @@ import org.jivesoftware.smack.util.stringencoder.Base32; import org.jxmpp.jid.BareJid; import org.jxmpp.jid.Jid; import org.jxmpp.jid.impl.JidCreate; -import org.jxmpp.util.XmppStringUtils; import org.xmlpull.v1.XmlPullParserFactory; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -211,16 +210,7 @@ public final class DirectoryRosterStore implements RosterStore { parser.next(); String jidString = parser.getText(); - // workaround for bug in jxmpp 0.5.0-alpha5, where - // JidCreate.bareFrom(String), which we would want to - // use here, does not produce correct results - String localpart = XmppStringUtils.parseLocalpart(jidString); - if (localpart.length() != 0) { - user = JidCreate.entityBareFrom(jidString); - } - else { - user = JidCreate.domainBareFrom(jidString); - } + user = JidCreate.bareFrom(jidString); } else if (parserName.equals("name")) { parser.next(); diff --git a/version.gradle b/version.gradle index 4254cd642..fcdc9bb84 100644 --- a/version.gradle +++ b/version.gradle @@ -2,7 +2,7 @@ allprojects { ext { shortVersion = '4.2.0-alpha2' isSnapshot = true - jxmppVersion = '0.5.0-alpha5' + jxmppVersion = '0.5.0-alpha6' smackMinAndroidSdk = 8 } }