Not having the correct context is the only way the trusted identities can
be null; with the correct context at least an empty set would be returned.
import net.pterodactylus.util.collection.SetBuilder;
import net.pterodactylus.util.logging.Logging;
+import net.pterodactylus.util.object.Default;
import net.pterodactylus.util.service.AbstractService;
import net.pterodactylus.wotns.freenet.plugin.PluginException;
identities.add(ownIdentity);
}
synchronized (syncObject) {
- identities.addAll(currentTrustedIdentities.get(ownIdentity));
+ identities.addAll(Default.forNull(currentTrustedIdentities.get(ownIdentity), Collections.<Identity> emptySet()));
}
return identities.get();
}