mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 22:12:05 +01:00
Treat XMPP addresses as case insensitive. SMACK-157
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2388 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
d1e5bb5c6d
commit
444306f7cd
3 changed files with 7 additions and 7 deletions
|
@ -399,7 +399,7 @@ public class Roster {
|
||||||
synchronized (entries) {
|
synchronized (entries) {
|
||||||
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
||||||
RosterEntry entry = (RosterEntry)i.next();
|
RosterEntry entry = (RosterEntry)i.next();
|
||||||
if (entry.getUser().equals(user)) {
|
if (entry.getUser().toLowerCase().equals(user.toLowerCase())) {
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -423,7 +423,7 @@ public class Roster {
|
||||||
synchronized (entries) {
|
synchronized (entries) {
|
||||||
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
||||||
RosterEntry entry = (RosterEntry)i.next();
|
RosterEntry entry = (RosterEntry)i.next();
|
||||||
if (entry.getUser().equals(user)) {
|
if (entry.getUser().toLowerCase().equals(user.toLowerCase())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -602,7 +602,7 @@ public class Roster {
|
||||||
synchronized (entries) {
|
synchronized (entries) {
|
||||||
for (Iterator i = entries.iterator(); i.hasNext();) {
|
for (Iterator i = entries.iterator(); i.hasNext();) {
|
||||||
RosterEntry entry = (RosterEntry) i.next();
|
RosterEntry entry = (RosterEntry) i.next();
|
||||||
if (entry.getUser().equals(key)) {
|
if (entry.getUser().toLowerCase().equals(key.toLowerCase())) {
|
||||||
fireRosterPresenceEvent(key);
|
fireRosterPresenceEvent(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -621,7 +621,7 @@ public class Roster {
|
||||||
synchronized (entries) {
|
synchronized (entries) {
|
||||||
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
||||||
RosterEntry entry = (RosterEntry)i.next();
|
RosterEntry entry = (RosterEntry)i.next();
|
||||||
if (entry.getUser().equals(key)) {
|
if (entry.getUser().toLowerCase().equals(key.toLowerCase())) {
|
||||||
fireRosterPresenceEvent(key);
|
fireRosterPresenceEvent(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class RosterEntry {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (object != null && object instanceof RosterEntry) {
|
if (object != null && object instanceof RosterEntry) {
|
||||||
return user.equals(((RosterEntry)object).getUser());
|
return user.toLowerCase().equals(((RosterEntry)object).getUser().toLowerCase());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -153,7 +153,7 @@ public class RosterGroup {
|
||||||
synchronized (entries) {
|
synchronized (entries) {
|
||||||
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
||||||
RosterEntry entry = (RosterEntry)i.next();
|
RosterEntry entry = (RosterEntry)i.next();
|
||||||
if (entry.getUser().equals(user)) {
|
if (entry.getUser().toLowerCase().equals(user.toLowerCase())) {
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ public class RosterGroup {
|
||||||
synchronized (entries) {
|
synchronized (entries) {
|
||||||
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
for (Iterator i=entries.iterator(); i.hasNext(); ) {
|
||||||
RosterEntry entry = (RosterEntry)i.next();
|
RosterEntry entry = (RosterEntry)i.next();
|
||||||
if (entry.getUser().equals(user)) {
|
if (entry.getUser().toLowerCase().equals(user.toLowerCase())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue