/* find removed own identities: */
for (OwnIdentity oldOwnIdentity : currentOwnIdentities.values()) {
OwnIdentity newOwnIdentity = newOwnIdentities.get(oldOwnIdentity.getId());
if ((newOwnIdentity == null) || ((context != null) && oldOwnIdentity.hasContext(context) && !newOwnIdentity.hasContext(context))) {
logger.finest(String.format("Own Identity removed: %s", oldOwnIdentity));
eventBus.post(new OwnIdentityRemovedEvent(new DefaultOwnIdentity(oldOwnIdentity)));
}
}
/* find added own identities. */
for (OwnIdentity currentOwnIdentity : newOwnIdentities.values()) {