X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FWebOfTrustConnector.java;h=2bd3d48af0a38a4283d8c6d5bbf075a26bc130da;hb=c3e470d2626bcbd932d4b01ce3f6c6b17ce184fd;hp=a06f826ee10615f5f499783d20dd44b42c6f2fa0;hpb=9ae2fe052fd8921e9e114f94efb864c90fbf356a;p=Sone.git 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 a06f826..2bd3d48 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java @@ -177,22 +177,6 @@ public class WebOfTrustConnector { } /** - * Returns the value of the property with the given name. - * - * @param identity - * The identity whose properties to check - * @param name - * The name of the property to return - * @return The value of the property, or {@code null} if there is no value - * @throws PluginException - * if an error occured talking to the Web of Trust plugin - */ - public String getProperty(Identity identity, String name) throws PluginException { - PluginReply reply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetProperty").put("Identity", identity.getId()).put("Property", name).get()); - return reply.getFields().get("Property"); - } - - /** * Sets the property with the given name to the given value. * * @param ownIdentity @@ -249,6 +233,10 @@ public class WebOfTrustConnector { } try { implicit = Integer.valueOf(score); + } catch (NumberFormatException nfe1) { + /* ignore. */ + } + try { distance = Integer.valueOf(rank); } catch (NumberFormatException nfe1) { /* ignore. */