/*
- * Sone - IdentityLoader.java - Copyright © 2013 David Roden
+ * Sone - IdentityLoader.java - Copyright © 2013–2019 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
package net.pterodactylus.sone.freenet.wot;
+import static java.util.Collections.emptySet;
import static net.pterodactylus.sone.freenet.wot.Context.extractContext;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* Loads {@link OwnIdentity}s and the {@link Identity}s they trust.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
public class IdentityLoader {
}
private Map<OwnIdentity, Collection<Identity>> loadTrustedIdentitiesForOwnIdentities(Collection<OwnIdentity> ownIdentities) throws PluginException {
- Map<OwnIdentity, Collection<Identity>> currentIdentities = new HashMap<OwnIdentity, Collection<Identity>>();
+ Map<OwnIdentity, Collection<Identity>> currentIdentities = new HashMap<>();
for (OwnIdentity ownIdentity : ownIdentities) {
if (identityDoesNotHaveTheCorrectContext(ownIdentity)) {
+ currentIdentities.put(ownIdentity, Collections.<Identity>emptySet());
continue;
}