1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Fix javadoc warnings and deprecated methods

This commit is contained in:
Florian Schmaus 2014-11-02 12:12:56 +01:00
parent c351382c73
commit fe3dcba9b2
11 changed files with 20 additions and 20 deletions

View file

@ -235,7 +235,7 @@ public class ChatManager extends Manager{
Chat chat = new Chat(this, userJID, threadID);
threadChats.put(threadID, chat);
jidChats.put(userJID, chat);
baseJidChats.put(XmppStringUtils.parseBareAddress(userJID), chat);
baseJidChats.put(XmppStringUtils.parseBareJid(userJID), chat);
for(ChatManagerListener listener : chatManagerListeners) {
listener.chatCreated(chat, createdLocally);
@ -248,7 +248,7 @@ public class ChatManager extends Manager{
threadChats.remove(chat.getThreadID());
String userJID = chat.getParticipant();
jidChats.remove(userJID);
baseJidChats.remove(XmppStringUtils.parseBareAddress(userJID));
baseJidChats.remove(XmppStringUtils.parseBareJid(userJID));
}
/**
@ -294,7 +294,7 @@ public class ChatManager extends Manager{
Chat match = jidChats.get(userJID);
if (match == null && (matchMode == MatchMode.BARE_JID)) {
match = baseJidChats.get(XmppStringUtils.parseBareAddress(userJID));
match = baseJidChats.get(XmppStringUtils.parseBareJid(userJID));
}
return match;
}

View file

@ -491,7 +491,7 @@ public class Roster {
* or if no presence information is available..
*/
public Presence getPresence(String user) {
String key = getPresenceMapKey(XmppStringUtils.parseBareAddress(user));
String key = getPresenceMapKey(XmppStringUtils.parseBareJid(user));
Map<String, Presence> userPresences = presenceMap.get(key);
if (userPresences == null) {
Presence presence = new Presence(Presence.Type.unavailable);
@ -629,7 +629,7 @@ public class Roster {
}
String key = user;
if (!contains(user)) {
key = XmppStringUtils.parseBareAddress(user);
key = XmppStringUtils.parseBareJid(user);
}
return key.toLowerCase(Locale.US);
}
@ -752,7 +752,7 @@ public class Roster {
String user = entry.getUser();
entries.remove(user);
unfiledEntries.remove(entry);
presenceMap.remove(XmppStringUtils.parseBareAddress(user));
presenceMap.remove(XmppStringUtils.parseBareJid(user));
deletedEntries.add(user);
for (Entry<String,RosterGroup> e: groups.entrySet()) {
@ -1029,7 +1029,7 @@ public class Roster {
// Roster push (RFC 6121, 2.1.6)
// A roster push with a non-empty from not matching our address MUST be ignored
String jid = XmppStringUtils.parseBareAddress(connection.getUser());
String jid = XmppStringUtils.parseBareJid(connection.getUser());
if (rosterPacket.getFrom() != null &&
!rosterPacket.getFrom().equals(jid)) {
LOGGER.warning("Ignoring roster push with a non matching 'from' ourJid=" + jid

View file

@ -122,7 +122,7 @@ public class RosterGroup {
}
// Roster entries never include a resource so remove the resource
// if it's a part of the XMPP address.
user = XmppStringUtils.parseBareAddress(user);
user = XmppStringUtils.parseBareJid(user);
String userLowerCase = user.toLowerCase(Locale.US);
synchronized (entries) {
for (RosterEntry entry : entries) {

View file

@ -395,7 +395,7 @@ public interface XMPPConnection {
*
* @param element
* @param namespace
* @return
* @return true if the server supports the stream feature.
*/
public boolean hasFeature(String element, String namespace);

View file

@ -72,7 +72,7 @@ public class FromMatchesFilter implements PacketFilter {
* have a from address.
*/
public static FromMatchesFilter createBare(String address) {
address = (address == null) ? null : XmppStringUtils.parseBareAddress(address);
address = (address == null) ? null : XmppStringUtils.parseBareJid(address);
return new FromMatchesFilter(address, true);
}
@ -96,7 +96,7 @@ public class FromMatchesFilter implements PacketFilter {
// Simplest form of NAMEPREP/STRINGPREP
from = from.toLowerCase(Locale.US);
if (matchBareJID) {
from = XmppStringUtils.parseBareAddress(from);
from = XmppStringUtils.parseBareJid(from);
}
return from.equals(address);
}

View file

@ -100,7 +100,7 @@ public class IQReplyFilter implements PacketFilter {
fromFilter.addFilter(FromMatchesFilter.createBare(local));
fromFilter.addFilter(FromMatchesFilter.createFull(server));
}
else if (to.equals(XmppStringUtils.parseBareAddress(local))) {
else if (to.equals(XmppStringUtils.parseBareJid(local))) {
fromFilter.addFilter(FromMatchesFilter.createFull(null));
}
}

View file

@ -295,7 +295,7 @@ public class SCRAMSHA1Mechanism extends SASLMechanism {
*
* @param key
* @param str
* @return
* @return the HMAC-SHA1 value of the input.
* @throws SmackException
*/
private static byte[] hmac(byte[] key, byte[] str) throws SmackException {
@ -317,7 +317,7 @@ public class SCRAMSHA1Mechanism extends SASLMechanism {
* @param str
* @param salt
* @param iterations
* @return
* @return the result of the Hi function.
* @throws SmackException
*/
private static byte[] hi(String str, byte[] salt, int iterations) throws SmackException {

View file

@ -101,7 +101,7 @@ public class SLF4JSmackDebugger implements SmackDebugger {
}
private String getUserTitle(String user) {
if (("@" + connection.getServiceName()).equals(XmppStringUtils.parseBareAddress(user))) {
if (("@" + connection.getServiceName()).equals(XmppStringUtils.parseBareJid(user))) {
return "<Anonymous>@" + connection.getServiceName();
} else {
return user;

View file

@ -328,7 +328,7 @@ public class LiteDebugger implements SmackDebugger {
boolean isAnonymous = "".equals(XmppStringUtils.parseLocalpart(user));
String title =
"Smack Debug Window -- "
+ (isAnonymous ? "" : XmppStringUtils.parseBareAddress(user))
+ (isAnonymous ? "" : XmppStringUtils.parseBareJid(user))
+ "@"
+ connection.getServiceName()
+ ":"

View file

@ -164,7 +164,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 = XmppStringUtils.parseBareAddress(from);
String bareJID = XmppStringUtils.parseBareJid(from);
to.remove(bareJID);
cc.remove(bareJID);
}

View file

@ -249,7 +249,7 @@ public class AgentRoster {
private String getPresenceMapKey(String user) {
String key = user;
if (!contains(user)) {
key = XmppStringUtils.parseBareAddress(user).toLowerCase(Locale.US);
key = XmppStringUtils.parseBareJid(user).toLowerCase(Locale.US);
}
return key;
}
@ -323,7 +323,7 @@ public class AgentRoster {
synchronized (entries) {
for (Iterator<String> i = entries.iterator(); i.hasNext();) {
String entry = i.next();
if (entry.toLowerCase(Locale.US).equals(XmppStringUtils.parseBareAddress(key).toLowerCase())) {
if (entry.toLowerCase(Locale.US).equals(XmppStringUtils.parseBareJid(key).toLowerCase())) {
fireEvent(EVENT_PRESENCE_CHANGED, packet);
}
}
@ -344,7 +344,7 @@ public class AgentRoster {
synchronized (entries) {
for (Iterator<String> i = entries.iterator(); i.hasNext();) {
String entry = (String)i.next();
if (entry.toLowerCase(Locale.US).equals(XmppStringUtils.parseBareAddress(key).toLowerCase())) {
if (entry.toLowerCase(Locale.US).equals(XmppStringUtils.parseBareJid(key).toLowerCase())) {
fireEvent(EVENT_PRESENCE_CHANGED, packet);
}
}