List<GroupItem> oldMembers = readGroup(group.getId(), cra);
dataTL.set(oldMembers);
Iterator<GroupItem> it = oldMembers.iterator();
while (it.hasNext()) {
boolean memberRemoved = true;
GroupItem ogi = it.next();
for (GroupItem gi : members) {
if (gi.getMember().equalsIgnoreCase(ogi.getMember())) {
memberRemoved = false;
continue; // member still exists
}
}
if (memberRemoved) {
GroupItemKey gik = new GroupItemKey(group.getId(), ogi.getMember(), ogi.getRevNo());
deleteItem(gik, cra);
it.remove();
}
}
for (GroupItem gi : members) {
boolean memberAdded = true;
for (GroupItem ogi : oldMembers) {
if (gi.getMember().equalsIgnoreCase(ogi.getMember())) {
memberAdded = false;
continue; // member still exists
}
}
if (memberAdded) {