X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FWebOfTrustConnector.java;h=de3f23a9c6223a7c87c23030178990f4737acd08;hp=1d30efb5cc5f8682992910bc67e4eba917f257f6;hb=2bacfa78f3191fd9847574a6c8b218a4882844a4;hpb=b9427df13c7231c3bc8ec787688d1240c1096f34 diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java b/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java index 1d30efb..de3f23a 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java @@ -96,7 +96,7 @@ public class WebOfTrustConnector { Reply reply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetOwnIdentities").get()); SimpleFieldSet fields = reply.getFields(); int ownIdentityCounter = -1; - Set ownIdentities = new HashSet(); + Set ownIdentities = new HashSet<>(); while (true) { String id = fields.get("Identity" + ++ownIdentityCounter); if (id == null) { @@ -142,7 +142,7 @@ public class WebOfTrustConnector { public Set loadTrustedIdentities(OwnIdentity ownIdentity, Optional context) throws PluginException { Reply reply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetIdentitiesByScore").put("Truster", ownIdentity.getId()).put("Selection", "+").put("Context", context.or("")).put("WantTrustValues", "true").get()); SimpleFieldSet fields = reply.getFields(); - Set identities = new HashSet(); + Set identities = new HashSet<>(); int identityCounter = -1; while (true) { String id = fields.get("Identity" + ++identityCounter); @@ -329,7 +329,7 @@ public class WebOfTrustConnector { * @return The parsed contexts */ private static Set parseContexts(String prefix, SimpleFieldSet fields) { - Set contexts = new HashSet(); + Set contexts = new HashSet<>(); int contextCounter = -1; while (true) { String context = fields.get(prefix + "Context" + ++contextCounter); @@ -351,7 +351,7 @@ public class WebOfTrustConnector { * @return The parsed properties */ private static Map parseProperties(String prefix, SimpleFieldSet fields) { - Map properties = new HashMap(); + Map properties = new HashMap<>(); int propertiesCounter = -1; while (true) { String propertyName = fields.get(prefix + "Property" + ++propertiesCounter + ".Name");