1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-30 10:12:06 +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:
Gaston Dombiak 2004-09-30 01:00:56 +00:00 committed by gdombiak
parent d1e5bb5c6d
commit 444306f7cd
3 changed files with 7 additions and 7 deletions

View file

@ -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);
} }
} }

View file

@ -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;

View file

@ -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;
} }
} }