1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Use jxmpp-core (0.1.0-alpha1-SNAPSHOT)

fixes also SMACK-570, since jxmpp-core's XmppStringUtil contains the fix
for SMACK-570.
This commit is contained in:
Florian Schmaus 2014-06-01 12:23:13 +02:00
parent 8977f5b3f0
commit f67d655fe7
34 changed files with 84 additions and 896 deletions

View file

@ -26,11 +26,11 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.util.Cache;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.address.packet.MultipleAddresses;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
import org.jxmpp.util.XmppStringUtils;
import java.util.ArrayList;
import java.util.Iterator;
@ -175,7 +175,7 @@ public class MultipleRecipientManager {
// Remove the sender from the TO/CC list (try with bare JID too)
String from = connection.getUser();
if (!to.remove(from) && !cc.remove(from)) {
String bareJID = StringUtils.parseBareAddress(from);
String bareJID = XmppStringUtils.parseBareAddress(from);
to.remove(bareJID);
cc.remove(bareJID);
}

View file

@ -20,7 +20,7 @@ import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.util.XmppDateTime;
import org.jxmpp.util.XmppDateTime;
import org.jivesoftware.smackx.amp.packet.AMPExtension;
import java.util.Date;

View file

@ -18,7 +18,7 @@ package org.jivesoftware.smackx.delay.packet;
import java.util.Date;
import org.jivesoftware.smack.util.XmppDateTime;
import org.jxmpp.util.XmppDateTime;
/**
* A decorator for the {@link DelayInformation} class to transparently support

View file

@ -21,7 +21,7 @@ import java.util.Date;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.jivesoftware.smack.util.XmppDateTime;
import org.jxmpp.util.XmppDateTime;
import org.jivesoftware.smackx.delay.packet.DelayInformation;
import org.xmlpull.v1.XmlPullParser;

View file

@ -25,8 +25,8 @@ import org.jivesoftware.smack.filter.PacketTypeFilter;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.XMPPError;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.si.packet.StreamInitiation;
import org.jxmpp.util.XmppStringUtils;
import java.util.ArrayList;
import java.util.List;
@ -136,7 +136,7 @@ public class FileTransferManager {
// We need to create outgoing file transfers with a full JID since this method will later
// use XEP-0095 to negotiate the stream. This is done with IQ stanzas that need to be addressed to a full JID
// in order to reach an client entity.
else if (!StringUtils.isFullJID(userID)) {
else if (!XmppStringUtils.isFullJID(userID)) {
throw new IllegalArgumentException("The provided user id was not a full JID (i.e. with resource part)");
}

View file

@ -20,7 +20,7 @@ package org.jivesoftware.smackx.muc;
import org.jivesoftware.smackx.muc.packet.MUCAdmin;
import org.jivesoftware.smackx.muc.packet.MUCUser;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.util.StringUtils;
import org.jxmpp.util.XmppStringUtils;
/**
* Represents the information about an occupant in a given room. The information will always have
@ -53,7 +53,7 @@ public class Occupant {
this.affiliation = item.getAffiliation();
this.role = item.getRole();
// Get the nickname from the FROM attribute of the presence
this.nick = StringUtils.parseResource(presence.getFrom());
this.nick = XmppStringUtils.parseResource(presence.getFrom());
}
/**

View file

@ -23,7 +23,7 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.util.StringUtils;
import org.jxmpp.util.XmppStringUtils;
import java.lang.ref.WeakReference;
import java.util.Locale;
@ -151,7 +151,7 @@ class RoomListenerMultiplexor extends AbstractConnectionListener {
if (from == null) {
return false;
}
return roomAddressTable.containsKey(StringUtils.parseBareAddress(from).toLowerCase(Locale.US));
return roomAddressTable.containsKey(XmppStringUtils.parseBareAddress(from).toLowerCase(Locale.US));
}
public void addRoom(String address) {
@ -192,7 +192,7 @@ class RoomListenerMultiplexor extends AbstractConnectionListener {
}
PacketMultiplexListener listener =
roomListenersByAddress.get(StringUtils.parseBareAddress(from).toLowerCase(Locale.US));
roomListenersByAddress.get(XmppStringUtils.parseBareAddress(from).toLowerCase(Locale.US));
if (listener != null) {
listener.processPacket(p);

View file

@ -23,7 +23,7 @@ import java.util.Date;
import java.util.List;
import java.util.UnknownFormatConversionException;
import org.jivesoftware.smack.util.XmppDateTime;
import org.jxmpp.util.XmppDateTime;
import org.jivesoftware.smackx.xdata.Form;
import org.jivesoftware.smackx.xdata.FormField;
import org.jivesoftware.smackx.xdata.packet.DataForm;

View file

@ -21,7 +21,7 @@ import java.util.Date;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.XmppDateTime;
import org.jxmpp.util.XmppDateTime;
import org.jivesoftware.smackx.xdata.packet.DataForm;
/**

View file

@ -23,7 +23,7 @@ import java.util.logging.Logger;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.XmppDateTime;
import org.jxmpp.util.XmppDateTime;
import org.jivesoftware.smackx.si.packet.StreamInitiation;
import org.jivesoftware.smackx.si.packet.StreamInitiation.File;
import org.jivesoftware.smackx.xdata.packet.DataForm;

View file

@ -18,7 +18,7 @@ package org.jivesoftware.smackx.time.packet;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.util.XmppDateTime;
import org.jxmpp.util.XmppDateTime;
import java.util.Calendar;
import java.util.Date;

View file

@ -29,7 +29,7 @@ import java.util.TimeZone;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.util.XmppDateTime;
import org.jxmpp.util.XmppDateTime;
import org.jivesoftware.smackx.InitExtensions;
import org.jivesoftware.smackx.delay.packet.DelayInfo;
import org.jivesoftware.smackx.delay.packet.DelayInformation;