X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FIdentityLoader.java;h=ff7e65f035aa5b6a65e3e4a44a9b0ed91eff3709;hp=e19cbfce530ecf3fc26998fbd96e686194fbb789;hb=2bacfa78f3191fd9847574a6c8b218a4882844a4;hpb=52f608f5902d6d05dd39599cdb2ed28f2465b4be diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityLoader.java b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityLoader.java index e19cbfc..ff7e65f 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityLoader.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityLoader.java @@ -1,5 +1,5 @@ /* - * Sone - IdentityLoader.java - Copyright © 2013 David Roden + * Sone - IdentityLoader.java - Copyright © 2013–2016 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 @@ -17,9 +17,11 @@ 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; @@ -31,8 +33,6 @@ import com.google.inject.Inject; /** * Loads {@link OwnIdentity}s and the {@link Identity}s they trust. - * - * @author David ‘Bombe’ Roden */ public class IdentityLoader { @@ -55,10 +55,11 @@ public class IdentityLoader { } private Map> loadTrustedIdentitiesForOwnIdentities(Collection ownIdentities) throws PluginException { - Map> currentIdentities = new HashMap>(); + Map> currentIdentities = new HashMap<>(); for (OwnIdentity ownIdentity : ownIdentities) { if (identityDoesNotHaveTheCorrectContext(ownIdentity)) { + currentIdentities.put(ownIdentity, Collections.emptySet()); continue; }