From: David ‘Bombe’ Roden Date: Tue, 27 Sep 2011 04:55:23 +0000 (+0200) Subject: Don’t suppress warnings. X-Git-Tag: 0.0.8^2~2 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9251a40d3196f48d8c72b604ee8944bf391d26b0;p=WoTNS.git Don’t suppress warnings. Use a better compiler configuration instead. --- diff --git a/src/main/java/net/pterodactylus/wotns/freenet/SimpleFieldSetBuilder.java b/src/main/java/net/pterodactylus/wotns/freenet/SimpleFieldSetBuilder.java index 1472a82..d3675f6 100644 --- a/src/main/java/net/pterodactylus/wotns/freenet/SimpleFieldSetBuilder.java +++ b/src/main/java/net/pterodactylus/wotns/freenet/SimpleFieldSetBuilder.java @@ -67,7 +67,7 @@ public class SimpleFieldSetBuilder { * The simple field set to copy * @return This simple field set builder */ - public SimpleFieldSetBuilder put(@SuppressWarnings("hiding") SimpleFieldSet simpleFieldSet) { + public SimpleFieldSetBuilder put(SimpleFieldSet simpleFieldSet) { this.simpleFieldSet.putAllOverwrite(simpleFieldSet); return this; } diff --git a/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java b/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java index 1c30752..5a53106 100644 --- a/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java @@ -212,7 +212,6 @@ public class IdentityManager extends AbstractService { protected void serviceRun() { while (!shouldStop()) { Map> currentIdentities = new HashMap>(); - @SuppressWarnings("hiding") Map currentOwnIdentities = new HashMap(); Set ownIdentities = null; @@ -314,7 +313,6 @@ public class IdentityManager extends AbstractService { */ private void checkTrustedIdentities(OwnIdentity ownIdentity, Map trustedIdentities) { - @SuppressWarnings("hiding") Map currentTrustedIdentities = new HashMap(); synchronized (syncObject) { if (this.currentTrustedIdentities.containsKey(ownIdentity)) { diff --git a/src/main/java/net/pterodactylus/wotns/freenet/wot/WebOfTrustConnector.java b/src/main/java/net/pterodactylus/wotns/freenet/wot/WebOfTrustConnector.java index f56f739..4274caf 100644 --- a/src/main/java/net/pterodactylus/wotns/freenet/wot/WebOfTrustConnector.java +++ b/src/main/java/net/pterodactylus/wotns/freenet/wot/WebOfTrustConnector.java @@ -86,7 +86,6 @@ public class WebOfTrustConnector implements ConnectorListener { * if the own identities can not be loaded */ public Set loadAllOwnIdentities() throws WebOfTrustException { - @SuppressWarnings("hiding") Reply reply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetOwnIdentities").get()); SimpleFieldSet fields = reply.getFields(); int ownIdentityCounter = -1; @@ -134,7 +133,6 @@ public class WebOfTrustConnector implements ConnectorListener { * if an error occured talking to the Web of Trust plugin */ public Set loadTrustedIdentities(OwnIdentity ownIdentity, String context) throws WebOfTrustException { - @SuppressWarnings("hiding") Reply reply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetIdentitiesByScore").put("TreeOwner", ownIdentity.getId()).put("Selection", "+").put("Context", (context == null) ? "" : context).get()); SimpleFieldSet fields = reply.getFields(); Set identities = new HashSet(); @@ -195,7 +193,6 @@ public class WebOfTrustConnector implements ConnectorListener { * if an error occured talking to the Web of Trust plugin */ public String getProperty(Identity identity, String name) throws PluginException { - @SuppressWarnings("hiding") Reply reply = performRequest(SimpleFieldSetConstructor.create().put("Message", "GetProperty").put("Identity", identity.getId()).put("Property", name).get()); return reply.getFields().get("Property"); } @@ -409,7 +406,7 @@ public class WebOfTrustConnector implements ConnectorListener { * {@inheritDoc} */ @Override - public void receivedReply(@SuppressWarnings("hiding") PluginConnector pluginConnector, SimpleFieldSet fields, Bucket data) { + public void receivedReply(PluginConnector pluginConnector, SimpleFieldSet fields, Bucket data) { String messageName = fields.get("Message"); logger.log(Level.FINEST, "Received Reply from Plugin: " + messageName); synchronized (reply) { diff --git a/src/main/java/net/pterodactylus/wotns/main/WoTNSPlugin.java b/src/main/java/net/pterodactylus/wotns/main/WoTNSPlugin.java index 83be95a..ff8f57a 100644 --- a/src/main/java/net/pterodactylus/wotns/main/WoTNSPlugin.java +++ b/src/main/java/net/pterodactylus/wotns/main/WoTNSPlugin.java @@ -137,7 +137,7 @@ public class WoTNSPlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL1 * {@inheritDoc} */ @Override - public void runPlugin(@SuppressWarnings("hiding") PluginRespirator pluginRespirator) { + public void runPlugin(PluginRespirator pluginRespirator) { this.pluginRespirator = pluginRespirator; PluginConnector pluginConnector = new PluginConnector(pluginRespirator);