Use updated class name.
[WoTNS.git] / src / main / java / net / pterodactylus / wotns / main / Resolver.java
index 4dacad9..7ec725c 100644 (file)
@@ -24,7 +24,7 @@ import java.util.Comparator;
 import java.util.List;
 import java.util.Set;
 
-import net.pterodactylus.util.collection.Default;
+import net.pterodactylus.util.object.Default;
 import net.pterodactylus.wotns.freenet.wot.Identity;
 import net.pterodactylus.wotns.freenet.wot.IdentityManager;
 import net.pterodactylus.wotns.freenet.wot.OwnIdentity;
@@ -40,14 +40,14 @@ public class Resolver {
 
        private final IdentityManager identityManager;
 
-       private OwnIdentity ownIdentity;
+       private String ownIdentityId;
 
        public Resolver(IdentityManager identityManager) {
                this.identityManager = identityManager;
        }
 
-       public void setOwnIdentity(OwnIdentity ownIdentity) {
-               this.ownIdentity = ownIdentity;
+       public void setOwnIdentityId(String ownIdentityId) {
+               this.ownIdentityId = ownIdentityId;
        }
 
        //
@@ -83,7 +83,7 @@ public class Resolver {
                }
                @SuppressWarnings("hiding")
                final OwnIdentity ownIdentity;
-               if (this.ownIdentity == null) {
+               if (this.ownIdentityId == null) {
                        Set<OwnIdentity> ownIdentities = identityManager.getAllOwnIdentities();
                        if (!ownIdentities.isEmpty()) {
                                ownIdentity = ownIdentities.iterator().next();
@@ -91,7 +91,7 @@ public class Resolver {
                                ownIdentity = null;
                        }
                } else {
-                       ownIdentity = this.ownIdentity;
+                       ownIdentity = identityManager.getOwnIdentity(ownIdentityId);
                }
                if (ownIdentity == null) {
                        return null;