/* find new identities. */
for (Identity currentIdentity : currentIdentities.get(ownIdentity).values()) {
if (!oldIdentities.containsKey(ownIdentity) || !oldIdentities.get(ownIdentity).containsKey(currentIdentity.getId())) {
logger.finest(String.format("Identity added for %s: %s", ownIdentity.getId(), currentIdentity));
eventBus.post(new IdentityAddedEvent(ownIdentity, currentIdentity));
}
}
/* find removed identities. */
if (oldIdentities.containsKey(ownIdentity)) {