1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-23 06:42:05 +01:00

Do not broadcast events for empty collections. SMACK-106

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3033 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2005-11-04 19:51:29 +00:00 committed by gato
parent e5ea043798
commit 254c4a450a

View file

@ -565,11 +565,17 @@ public class Roster {
rosterListeners.toArray(listeners); rosterListeners.toArray(listeners);
} }
for (int i=0; i<listeners.length; i++) { for (int i=0; i<listeners.length; i++) {
if (!addedEntries.isEmpty()) {
listeners[i].entriesAdded(addedEntries); listeners[i].entriesAdded(addedEntries);
}
if (!updatedEntries.isEmpty()) {
listeners[i].entriesUpdated(updatedEntries); listeners[i].entriesUpdated(updatedEntries);
}
if (!deletedEntries.isEmpty()) {
listeners[i].entriesDeleted(deletedEntries); listeners[i].entriesDeleted(deletedEntries);
} }
} }
}
/** /**
* Fires roster presence changed event to roster listeners. * Fires roster presence changed event to roster listeners.