diff --git a/smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java b/smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java
index 667d49434..08b7f2c89 100644
--- a/smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java
+++ b/smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java
@@ -48,7 +48,7 @@ public class FromMatchesFilter implements StanzaFilter {
*/
public FromMatchesFilter(Jid address, boolean ignoreResourcepart) {
if (address != null && ignoreResourcepart) {
- this.address = address.withoutResource();
+ this.address = address.asBareJid();
}
else {
this.address = address;
@@ -99,7 +99,7 @@ public class FromMatchesFilter implements StanzaFilter {
}
if (ignoreResourcepart) {
- from = from.withoutResource();
+ from = from.asBareJid();
}
return from.equals(address);
}
diff --git a/smack-core/src/main/java/org/jivesoftware/smack/provider/BindIQProvider.java b/smack-core/src/main/java/org/jivesoftware/smack/provider/BindIQProvider.java
index c6bd736d4..91925dffa 100644
--- a/smack-core/src/main/java/org/jivesoftware/smack/provider/BindIQProvider.java
+++ b/smack-core/src/main/java/org/jivesoftware/smack/provider/BindIQProvider.java
@@ -44,7 +44,7 @@ public class BindIQProvider extends IQProvider {
bind = Bind.newSet(Resourcepart.from(resourceString));
break;
case "jid":
- EntityFullJid fullJid = JidCreate.fullFrom(parser.nextText());
+ EntityFullJid fullJid = JidCreate.entityFullFrom(parser.nextText());
bind = Bind.newResult(fullJid);
break;
}
diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java
index 094a4101c..f018b8a62 100644
--- a/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java
+++ b/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java
@@ -76,7 +76,7 @@ public class ParserUtils {
if (jidString == null) {
return null;
}
- return JidCreate.bareFrom(jidString);
+ return JidCreate.entityBareFrom(jidString);
}
public static Resourcepart getResourcepartAttribute(XmlPullParser parser, String name) throws XmppStringprepException {
diff --git a/smack-core/src/test/java/org/jivesoftware/smack/DummyConnection.java b/smack-core/src/test/java/org/jivesoftware/smack/DummyConnection.java
index c5d14964d..33b17b65a 100644
--- a/smack-core/src/test/java/org/jivesoftware/smack/DummyConnection.java
+++ b/smack-core/src/test/java/org/jivesoftware/smack/DummyConnection.java
@@ -67,7 +67,7 @@ public class DummyConnection extends AbstractXMPPConnection {
private EntityFullJid getUserJid() {
try {
- return JidCreate.fullFrom(config.getUsername()
+ return JidCreate.entityFullFrom(config.getUsername()
+ "@"
+ config.getXMPPServiceDomain()
+ "/"
diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/address/MultipleRecipientManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/address/MultipleRecipientManager.java
index dd5750b17..7290d0ddd 100644
--- a/smack-extensions/src/main/java/org/jivesoftware/smackx/address/MultipleRecipientManager.java
+++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/address/MultipleRecipientManager.java
@@ -180,7 +180,7 @@ public class MultipleRecipientManager {
// Remove the sender from the TO/CC list (try with bare JID too)
EntityFullJid from = connection.getUser();
if (!to.remove(from) && !cc.remove(from)) {
- EntityBareJid bareJID = from.asBareJid();
+ EntityBareJid bareJID = from.asEntityBareJid();
to.remove(bareJID);
cc.remove(bareJID);
}
diff --git a/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java b/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java
index 0591b5971..9351b233b 100644
--- a/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java
+++ b/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java
@@ -257,7 +257,7 @@ public final class ChatManager extends Manager{
Chat chat = new Chat(this, userJID, threadID);
threadChats.put(threadID, chat);
jidChats.put(userJID, chat);
- baseJidChats.put(userJID.asBareJid(), chat);
+ baseJidChats.put(userJID.asEntityBareJid(), chat);
for(ChatManagerListener listener : chatManagerListeners) {
listener.chatCreated(chat, createdLocally);
@@ -270,7 +270,7 @@ public final class ChatManager extends Manager{
threadChats.remove(chat.getThreadID());
EntityJid userJID = chat.getParticipant();
jidChats.remove(userJID);
- baseJidChats.remove(userJID.withoutResource());
+ baseJidChats.remove(userJID.asEntityBareJid());
}
/**
diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java
index 20ba2c854..d22c46ac6 100644
--- a/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java
+++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java
@@ -146,7 +146,7 @@ public final class Roster extends Manager {
* A map of JIDs to another Map of Resourceparts to Presences. The 'inner' map may contain
* {@link Resourcepart#EMPTY} if there are no other Presences available.
*/
- private final Map> presenceMap = new ConcurrentHashMap<>();
+ private final Map> presenceMap = new ConcurrentHashMap<>();
/**
* Listeners called when the Roster was loaded.
@@ -698,28 +698,27 @@ public final class Roster extends Manager {
* Returns the roster entry associated with the given XMPP address or
* null if the user is not an entry in the roster.
*
- * @param user the XMPP address of the user (eg "jsmith@example.com"). The address could be
+ * @param jid the XMPP address of the user (eg "jsmith@example.com"). The address could be
* in any valid format (e.g. "domain/resource", "user@domain" or "user@domain/resource").
* @return the roster entry or null if it does not exist.
*/
- public RosterEntry getEntry(Jid user) {
- if (user == null) {
+ public RosterEntry getEntry(BareJid jid) {
+ if (jid == null) {
return null;
}
- Jid key = getMapKey(user);
- return entries.get(key);
+ return entries.get(jid);
}
/**
* Returns true if the specified XMPP address is an entry in the roster.
*
- * @param user the XMPP address of the user (eg "jsmith@example.com"). The
- * address could be in any valid format (e.g. "domain/resource",
- * "user@domain" or "user@domain/resource").
+ * @param jid the XMPP address of the user (eg "jsmith@example.com"). The
+ * address must be a bare JID e.g. "domain/resource" or
+ * "user@domain".
* @return true if the XMPP address is an entry in the roster.
*/
- public boolean contains(Jid user) {
- return getEntry(user) != null;
+ public boolean contains(BareJid jid) {
+ return getEntry(jid) != null;
}
/**
@@ -775,18 +774,17 @@ public final class Roster extends Manager {
* {@link RosterListener}.
*
*
- * @param user an XMPP ID. The address could be in any valid format (e.g.
- * "domain/resource", "user@domain" or "user@domain/resource"). Any resource
- * information that's part of the ID will be discarded.
+ * @param jid the XMPP address of the user (eg "jsmith@example.com"). The
+ * address must be a bare JID e.g. "domain/resource" or
+ * "user@domain".
* @return the user's current presence, or unavailable presence if the user is offline
* or if no presence information is available..
*/
- public Presence getPresence(Jid user) {
- Jid key = getMapKey(user);
- Map userPresences = presenceMap.get(key);
+ public Presence getPresence(Jid jid) {
+ Map userPresences = presenceMap.get(jid);
if (userPresences == null) {
Presence presence = new Presence(Presence.Type.unavailable);
- presence.setFrom(user);
+ presence.setFrom(jid);
return presence;
}
else {
@@ -829,7 +827,7 @@ public final class Roster extends Manager {
}
else {
presence = new Presence(Presence.Type.unavailable);
- presence.setFrom(user);
+ presence.setFrom(jid);
return presence;
}
}
@@ -849,7 +847,7 @@ public final class Roster extends Manager {
* or if no presence information is available.
*/
public Presence getPresenceResource(FullJid userWithResource) {
- Jid key = getMapKey(userWithResource);
+ BareJid key = userWithResource.asBareJid();
Resourcepart resource = userWithResource.getResourcepart();
Map userPresences = presenceMap.get(key);
if (userPresences == null) {
@@ -878,8 +876,8 @@ public final class Roster extends Manager {
* @return a List of Presence objects for all the user's current presences, or an unavailable presence if no
* presence information is available.
*/
- public List getAllPresences(Jid bareJid) {
- Map userPresences = presenceMap.get(getMapKey(bareJid));
+ public List getAllPresences(BareJid bareJid) {
+ Map userPresences = presenceMap.get(bareJid);
List res;
if (userPresences == null) {
// Create an unavailable presence if none was found
@@ -902,7 +900,7 @@ public final class Roster extends Manager {
* @param bareJid the bare JID from which the presences should be retrieved.
* @return available presences for the bare JID.
*/
- public List getAvailablePresences(Jid bareJid) {
+ public List getAvailablePresences(BareJid bareJid) {
List allPresences = getAllPresences(bareJid);
List res = new ArrayList<>(allPresences.size());
for (Presence presence : allPresences) {
@@ -920,18 +918,17 @@ public final class Roster extends Manager {
* information is available, such as when you are not subscribed to the user's presence
* updates.
*
- * @param user an XMPP ID, e.g. jdoe@example.com.
+ * @param jid an XMPP ID, e.g. jdoe@example.com.
* @return a List of Presence objects for all the user's current presences,
* or an unavailable presence if the user is offline or if no presence information
* is available.
*/
- public List getPresences(Jid user) {
+ public List getPresences(BareJid jid) {
List res;
- Jid key = getMapKey(user);
- Map userPresences = presenceMap.get(key);
+ Map userPresences = presenceMap.get(jid);
if (userPresences == null) {
Presence presence = new Presence(Presence.Type.unavailable);
- presence.setFrom(user);
+ presence.setFrom(jid);
res = Arrays.asList(presence);
}
else {
@@ -954,7 +951,7 @@ public final class Roster extends Manager {
}
else {
Presence presence = new Presence(Presence.Type.unavailable);
- presence.setFrom(user);
+ presence.setFrom(jid);
res = Arrays.asList(presence);
}
}
@@ -976,10 +973,14 @@ public final class Roster extends Manager {
* @since 4.1
*/
public boolean isSubscribedToMyPresence(Jid jid) {
- if (connection().getXMPPServiceDomain().equals(jid)) {
+ if (jid == null) {
+ return false;
+ }
+ BareJid bareJid = jid.asBareJid();
+ if (connection().getXMPPServiceDomain().equals(bareJid)) {
return true;
}
- RosterEntry entry = getEntry(jid);
+ RosterEntry entry = getEntry(bareJid);
if (entry == null) {
return false;
}
@@ -1019,34 +1020,6 @@ public final class Roster extends Manager {
return rosterStore;
}
- /**
- * Returns the key to use in the presenceMap and entries Map for a fully qualified XMPP ID.
- * The roster can contain any valid address format such us "domain/resource",
- * "user@domain" or "user@domain/resource". If the roster contains an entry
- * associated with the fully qualified XMPP ID then use the fully qualified XMPP
- * ID as the key in presenceMap, otherwise use the bare address. Note: When the
- * key in presenceMap is a fully qualified XMPP ID, the userPresences is useless
- * since it will always contain one entry for the user.
- *
- * @param user the bare or fully qualified XMPP ID, e.g. jdoe@example.com or
- * jdoe@example.com/Work.
- * @return the key to use in the presenceMap and entries Map for the fully qualified XMPP ID.
- */
- private Jid getMapKey(Jid user) {
- if (user == null) {
- return null;
- }
- if (entries.containsKey(user)) {
- return user;
- }
- EntityBareJid bareJid = user.asEntityBareJidIfPossible();
- if (bareJid != null) {
- return bareJid;
- }
- // jid validate, log this case?
- return user;
- }
-
/**
* Changes the presence of available contacts offline by simulating an unavailable
* presence sent from the server. After a disconnection, every Presence is set
@@ -1280,7 +1253,7 @@ public final class Roster extends Manager {
* @param key the presence map key
* @return the user presences
*/
- private Map getUserPresences(Jid key) {
+ private Map getUserPresences(BareJid key) {
Map userPresences = presenceMap.get(key);
if (userPresences == null) {
userPresences = new ConcurrentHashMap<>();
@@ -1300,7 +1273,7 @@ public final class Roster extends Manager {
fromResource = Resourcepart.EMPTY;
}
}
- Jid key = getMapKey(from);
+ BareJid key = from != null ? from.asBareJid() : null;
Map userPresences;
// If an "available" presence, add it to the presence map. Each presence
@@ -1471,7 +1444,7 @@ public final class Roster extends Manager {
// Roster push (RFC 6121, 2.1.6)
// A roster push with a non-empty from not matching our address MUST be ignored
- EntityBareJid jid = connection.getUser().asBareJid();
+ EntityBareJid jid = connection.getUser().asEntityBareJid();
Jid from = rosterPacket.getFrom();
if (from != null && !from.equals(jid)) {
LOGGER.warning("Ignoring roster push with a non matching 'from' ourJid='" + jid + "' from='" + from
diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterGroup.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterGroup.java
index f756c26cb..27f810fa9 100644
--- a/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterGroup.java
+++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterGroup.java
@@ -124,7 +124,7 @@ public class RosterGroup extends Manager {
}
// Roster entries never include a resource so remove the resource
// if it's a part of the XMPP address.
- user = user.withoutResource();
+ user = user.asBareJid();
synchronized (entries) {
for (RosterEntry entry : entries) {
if (entry.getJid().equals(user)) {
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 6be9e2199..fb0e378e5 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,6 +24,7 @@ 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;
@@ -49,7 +50,18 @@ public class RosterPacketProvider extends IQProvider {
case "item":
String jidString = parser.getAttributeValue("", "jid");
String name = parser.getAttributeValue("", "name");
- BareJid jid = JidCreate.bareFrom(jidString);
+
+ // 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);
+ }
+
// Create packet.
item = new RosterPacket.Item(jid, name);
// Set status.
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 30ef456b8..d677b8d12 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,6 +34,7 @@ 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;
@@ -208,7 +209,18 @@ public final class DirectoryRosterStore implements RosterStore {
}
else if (parserName.equals("user")) {
parser.next();
- user = JidCreate.bareFrom(parser.getText());
+
+ 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);
+ }
}
else if (parserName.equals("name")) {
parser.next();
diff --git a/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterTest.java b/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterTest.java
index dfd7ad2cb..eea54d25a 100644
--- a/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterTest.java
+++ b/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterTest.java
@@ -106,9 +106,9 @@ public class RosterTest extends InitSmackIm {
// Verify roster
assertTrue("Roster can't be loaded!", roster.waitUntilLoaded());
- verifyRomeosEntry(roster.getEntry(JidCreate.from("romeo@example.net")));
- verifyMercutiosEntry(roster.getEntry(JidCreate.from("mercutio@example.com")));
- verifyBenvoliosEntry(roster.getEntry(JidCreate.from("benvolio@example.net")));
+ verifyRomeosEntry(roster.getEntry(JidCreate.entityBareFrom("romeo@example.net")));
+ verifyMercutiosEntry(roster.getEntry(JidCreate.entityBareFrom("mercutio@example.com")));
+ verifyBenvoliosEntry(roster.getEntry(JidCreate.entityBareFrom("benvolio@example.net")));
assertSame("Wrong number of roster entries.", 3, roster.getEntries().size());
// Verify roster listener
@@ -134,7 +134,7 @@ public class RosterTest extends InitSmackIm {
@Test
public void testAddRosterItem() throws Throwable {
// Constants for the new contact
- final BareJid contactJID = JidCreate.bareFrom("nurse@example.com");
+ final BareJid contactJID = JidCreate.entityBareFrom("nurse@example.com");
final String contactName = "Nurse";
final String[] contactGroup = {"Servants"};
@@ -191,9 +191,9 @@ public class RosterTest extends InitSmackIm {
addedEntry.getGroups().iterator().next().getName());
// Verify the unchanged roster items
- verifyRomeosEntry(roster.getEntry(JidCreate.from("romeo@example.net")));
- verifyMercutiosEntry(roster.getEntry(JidCreate.from("mercutio@example.com")));
- verifyBenvoliosEntry(roster.getEntry(JidCreate.from("benvolio@example.net")));
+ verifyRomeosEntry(roster.getEntry(JidCreate.entityBareFrom("romeo@example.net")));
+ verifyMercutiosEntry(roster.getEntry(JidCreate.entityBareFrom("mercutio@example.com")));
+ verifyBenvoliosEntry(roster.getEntry(JidCreate.entityBareFrom("benvolio@example.net")));
assertSame("Wrong number of roster entries.", 4, roster.getEntries().size());
}
@@ -205,7 +205,7 @@ public class RosterTest extends InitSmackIm {
@Test
public void testUpdateRosterItem() throws Throwable {
// Constants for the updated contact
- final Jid contactJID = JidCreate.from("romeo@example.net");
+ final BareJid contactJID = JidCreate.entityBareFrom("romeo@example.net");
final String contactName = "Romeo";
final String[] contactGroups = {"Friends", "Lovers"};
@@ -265,8 +265,8 @@ public class RosterTest extends InitSmackIm {
addedEntry.getGroups().size());
// Verify the unchanged roster items
- verifyMercutiosEntry(roster.getEntry(JidCreate.from("mercutio@example.com")));
- verifyBenvoliosEntry(roster.getEntry(JidCreate.from("benvolio@example.net")));
+ verifyMercutiosEntry(roster.getEntry(JidCreate.entityBareFrom("mercutio@example.com")));
+ verifyBenvoliosEntry(roster.getEntry(JidCreate.entityBareFrom("benvolio@example.net")));
assertSame("Wrong number of roster entries (" + roster.getEntries() + ").",
3,
roster.getEntries().size());
@@ -280,7 +280,7 @@ public class RosterTest extends InitSmackIm {
@Test
public void testDeleteRosterItem() throws Throwable {
// The contact which should be deleted
- final Jid contactJID = JidCreate.from("romeo@example.net");
+ final BareJid contactJID = JidCreate.entityBareFrom("romeo@example.net");
// Setup
assertNotNull("Can't get the roster from the provided connection!", roster);
@@ -312,8 +312,8 @@ public class RosterTest extends InitSmackIm {
assertNull("The contact wasn't deleted from the roster!", deletedEntry);
assertTrue("The roster listener wasn't invoked for the deleted contact!",
rosterListener.getDeletedAddresses().contains(contactJID));
- verifyMercutiosEntry(roster.getEntry(JidCreate.from("mercutio@example.com")));
- verifyBenvoliosEntry(roster.getEntry(JidCreate.from("benvolio@example.net")));
+ verifyMercutiosEntry(roster.getEntry(JidCreate.entityBareFrom("mercutio@example.com")));
+ verifyBenvoliosEntry(roster.getEntry(JidCreate.entityBareFrom("benvolio@example.net")));
assertSame("Wrong number of roster entries (" + roster.getEntries() + ").",
2,
roster.getEntries().size());
@@ -326,7 +326,7 @@ public class RosterTest extends InitSmackIm {
*/
@Test
public void testSimpleRosterPush() throws Throwable {
- final Jid contactJID = JidCreate.from("nurse@example.com");
+ final BareJid contactJID = JidCreate.entityBareFrom("nurse@example.com");
assertNotNull("Can't get the roster from the provided connection!", roster);
final StringBuilder sb = new StringBuilder();
sb.append(" addresses) {
for (Jid jid : addresses) {
- if (!jid.equals(conTwo.getUser().asBareJidString())) {
+ if (!jid.equals(conTwo.getUser().asBareJid())) {
continue;
}
RosterEntry rosterEntry = rosterOne.getEntry(conTwo.getUser().asBareJid());
diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java
index 02f437351..6d905d611 100644
--- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java
+++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java
@@ -63,7 +63,7 @@ public class MultiUserChatIntegrationTest extends AbstractSmackIntegrationTest {
@SmackIntegrationTest
public void mucTest() throws TimeoutException, Exception {
- EntityBareJid mucAddress = JidCreate.bareFrom(Localpart.from("smack-inttest-" + randomString), mucService.getDomain());
+ EntityBareJid mucAddress = JidCreate.entityBareFrom(Localpart.from("smack-inttest-" + randomString), mucService.getDomain());
MultiUserChat mucAsSeenByOne = mucManagerOne.getMultiUserChat(mucAddress);
MultiUserChat mucAsSeenByTwo = mucManagerTwo.getMultiUserChat(mucAddress);
diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatLowLevelIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatLowLevelIntegrationTest.java
index 62fbe8e7b..58a473bef 100644
--- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatLowLevelIntegrationTest.java
+++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatLowLevelIntegrationTest.java
@@ -62,7 +62,7 @@ public class MultiUserChatLowLevelIntegrationTest extends AbstractSmackLowLevelI
final Resourcepart mucNickname = Resourcepart.from("Nick-" + StringUtils.randomString(6));
final String randomMucName = StringUtils.randomString(6);
final DomainBareJid mucComponent = multiUserChatManager.getXMPPServiceDomains().get(0);
- final MultiUserChat muc = multiUserChatManager.getMultiUserChat(JidCreate.bareFrom(
+ final MultiUserChat muc = multiUserChatManager.getMultiUserChat(JidCreate.entityBareFrom(
Localpart.from(randomMucName), mucComponent));
MucCreateConfigFormHandle handle = muc.createOrJoin(mucNickname);
diff --git a/version.gradle b/version.gradle
index 8dcaa0258..4254cd642 100644
--- a/version.gradle
+++ b/version.gradle
@@ -2,7 +2,7 @@ allprojects {
ext {
shortVersion = '4.2.0-alpha2'
isSnapshot = true
- jxmppVersion = '0.5.0-alpha4'
+ jxmppVersion = '0.5.0-alpha5'
smackMinAndroidSdk = 8
}
}