From: David ‘Bombe’ Roden Date: Thu, 17 Jan 2013 13:31:25 +0000 (+0100) Subject: Don’t declare exceptions that are never thrown. X-Git-Tag: 0.8.5^2~3^2~72 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=0cc3f122d58e3da8be819e571fd654be463b9f88;p=Sone.git Don’t declare exceptions that are never thrown. --- diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java index e130fa2..b8684b0 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java @@ -18,7 +18,6 @@ package net.pterodactylus.sone.fcp; import net.pterodactylus.sone.core.Core; -import net.pterodactylus.sone.freenet.fcp.FcpException; import freenet.support.SimpleFieldSet; import freenet.support.api.Bucket; @@ -44,7 +43,7 @@ public class GetLocalSonesCommand extends AbstractSoneCommand { * {@inheritDoc} */ @Override - public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { + public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) { return new Response("ListLocalSones", encodeSones(getCore().getLocalSones(), "LocalSones.")); } diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java index e387cb4..9ff8587 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java @@ -23,7 +23,6 @@ import java.util.List; import net.pterodactylus.sone.core.Core; import net.pterodactylus.sone.data.Sone; -import net.pterodactylus.sone.freenet.fcp.FcpException; import freenet.support.SimpleFieldSet; import freenet.support.api.Bucket; @@ -48,7 +47,7 @@ public class GetSonesCommand extends AbstractSoneCommand { * {@inheritDoc} */ @Override - public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { + public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) { int startSone = getInt(parameters, "StartSone", 0); int maxSones = getInt(parameters, "MaxSones", -1); List sones = new ArrayList(getCore().getSones()); diff --git a/src/main/java/net/pterodactylus/sone/freenet/StringBucket.java b/src/main/java/net/pterodactylus/sone/freenet/StringBucket.java index b112f5a..c96a3cd 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/StringBucket.java +++ b/src/main/java/net/pterodactylus/sone/freenet/StringBucket.java @@ -18,7 +18,6 @@ package net.pterodactylus.sone.freenet; import java.io.ByteArrayInputStream; -import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.Charset; @@ -84,7 +83,7 @@ public class StringBucket implements Bucket { * {@inheritDoc} */ @Override - public InputStream getInputStream() throws IOException { + public InputStream getInputStream() { return new ByteArrayInputStream(string.getBytes(encoding)); } @@ -100,7 +99,7 @@ public class StringBucket implements Bucket { * {@inheritDoc} */ @Override - public OutputStream getOutputStream() throws IOException { + public OutputStream getOutputStream() { return null; }