From: David ‘Bombe’ Roden Date: Wed, 9 Apr 2008 11:27:22 +0000 (+0000) Subject: remove exceptions X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=67943911fde9448122d11bfba5a6f6ebcbd95e72;p=jSite2.git remove exceptions git-svn-id: http://trooper/svn/projects/jSite/trunk@662 c3eda9e8-030b-0410-8277-bc7414b0a119 --- diff --git a/src/net/pterodactylus/util/fcp/FcpException.java b/src/net/pterodactylus/util/fcp/FcpException.java deleted file mode 100644 index 8a998fe..0000000 --- a/src/net/pterodactylus/util/fcp/FcpException.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * jSite2 - FcpException.java - - * Copyright © 2008 David Roden - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package net.pterodactylus.util.fcp; - -/** - * TODO - * - * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ - */ -public class FcpException extends Exception { - - public FcpException() { - } - - public FcpException(String message) { - super(message); - } - - public FcpException(Throwable cause) { - super(cause); - } - - public FcpException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/src/net/pterodactylus/util/fcp/FcpProtocolException.java b/src/net/pterodactylus/util/fcp/FcpProtocolException.java deleted file mode 100644 index 795798f..0000000 --- a/src/net/pterodactylus/util/fcp/FcpProtocolException.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * jSite2 - FcpProtocolException.java - - * Copyright © 2008 David Roden - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package net.pterodactylus.util.fcp; - -/** - * TODO - * - * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ - */ -public class FcpProtocolException extends FcpException { - - private final int code; - private final boolean fatal; - private final boolean global; - - private String codeDescription; - private String extraDescription; - private String identifier; - - public FcpProtocolException(int code, boolean fatal, boolean global) { - this.code = code; - this.fatal = fatal; - this.global = global; - } - - /** - * TODO - * - * @return the code - */ - int getCode() { - return code; - } - - /** - * TODO - * - * @return the fatal - */ - boolean isFatal() { - return fatal; - } - - /** - * TODO - * - * @return the global - */ - boolean isGlobal() { - return global; - } - - /** - * TODO - * - * @return the codeDescription - */ - String getCodeDescription() { - return codeDescription; - } - - /** - * TODO - * - * @param codeDescription - * the codeDescription to set - */ - void setCodeDescription(String codeDescription) { - this.codeDescription = codeDescription; - } - - /** - * TODO - * - * @return the extraDescription - */ - String getExtraDescription() { - return extraDescription; - } - - /** - * TODO - * - * @param extraDescription - * the extraDescription to set - */ - void setExtraDescription(String extraDescription) { - this.extraDescription = extraDescription; - } - - /** - * TODO - * - * @return the identifier - */ - String getIdentifier() { - return identifier; - } - - /** - * TODO - * - * @param identifier - * the identifier to set - */ - void setIdentifier(String identifier) { - this.identifier = identifier; - } - -} diff --git a/src/net/pterodactylus/util/fcp/FcpTest.java b/src/net/pterodactylus/util/fcp/FcpTest.java index b07bb85..e0d20e4 100644 --- a/src/net/pterodactylus/util/fcp/FcpTest.java +++ b/src/net/pterodactylus/util/fcp/FcpTest.java @@ -60,12 +60,10 @@ public class FcpTest extends TestCase { * Tests the FCP connection be simply {@link #setUp() setting it up} and * {@link #tearDown() tearing it down} again. * - * @throws FcpException - * if an FCP error occurs * @throws IOException * if an I/O error occurs */ - public void testFcpConnection() throws FcpException, IOException { + public void testFcpConnection() throws IOException { /* do nothing. */ } @@ -90,14 +88,12 @@ public class FcpTest extends TestCase { /** * Generates an SSK key pair. * - * @throws FcpException - * if an FCP error occurs * @throws IOException * if an I/O error occurs * @throws InterruptedException * if {@link Object#wait()} wakes up spuriously */ - public void testGenerateSSK() throws IOException, FcpException, InterruptedException { + public void testGenerateSSK() throws IOException, InterruptedException { final boolean[] result = new boolean[1]; FcpAdapter fcpAdapter = new FcpAdapter() { /**