*/
public Set<Identity> getTrustedIdentities(OwnIdentity ownIdentity) {
Set<Identity> identities = new HashSet<Identity>();
- if ((context == null) || ownIdentity.getContexts().contains(context)) {
- identities.add(ownIdentity);
+ for (OwnIdentity additionalOwnIdentity : getAllOwnIdentities()) {
+ if ((context == null) || additionalOwnIdentity.getContexts().contains(context)) {
+ identities.add(additionalOwnIdentity);
+ }
}
try {
Set<Identity> trustedIdentities = webOfTrustConnector.loadTrustedIdentities(ownIdentity, context);
newTrustedIdentities.put(trustedIdentity.getId(), trustedIdentity);
}
checkTrustedIdentities(ownIdentity, newTrustedIdentities);
+ identities.addAll(trustedIdentities);
} catch (WebOfTrustException wote1) {
logger.log(Level.WARNING, String.format("Could not load all trusted identities for %s.", ownIdentity), wote1);
}
protected void serviceRun() {
while (!shouldStop()) {
Map<OwnIdentity, Map<String, Identity>> currentIdentities = new HashMap<OwnIdentity, Map<String, Identity>>();
- @SuppressWarnings("hiding")
Map<String, OwnIdentity> currentOwnIdentities = new HashMap<String, OwnIdentity>();
Set<OwnIdentity> ownIdentities = null;
*/
private void checkTrustedIdentities(OwnIdentity ownIdentity, Map<String, Identity> trustedIdentities) {
- @SuppressWarnings("hiding")
Map<String, Identity> currentTrustedIdentities = new HashMap<String, Identity>();
synchronized (syncObject) {
if (this.currentTrustedIdentities.containsKey(ownIdentity)) {