diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/ChecksumTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/ChecksumTest.java index e103f98ec..695a5cded 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/ChecksumTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/ChecksumTest.java @@ -18,8 +18,6 @@ package org.apache.tools.ant.taskdefs; -import java.io.IOException; - import org.apache.tools.ant.BuildFileRule; import org.junit.After; import org.junit.Before; @@ -47,17 +45,17 @@ public class ChecksumTest { } @Test - public void testCreateMD5SUMformat() throws IOException { + public void testCreateMD5SUMformat() { buildRule.executeTarget("createMD5SUMformat"); } @Test - public void testCreateSVFformat() throws IOException { + public void testCreateSVFformat() { buildRule.executeTarget("createSVFformat"); } @Test - public void testCreatePattern() throws IOException { + public void testCreatePattern() { buildRule.executeTarget("createPattern"); } diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java index b6d3e5a2d..c00d1b79d 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java @@ -62,7 +62,7 @@ public class ExecuteJavaTest { } @Test - public void testNoTimeOut() throws Exception { + public void testNoTimeOut() { Commandline cmd = getCommandline(TIME_OUT / 2); ej.setJavaCommand(cmd); ej.execute(project); @@ -71,7 +71,7 @@ public class ExecuteJavaTest { // test that the watchdog ends the process @Test - public void testTimeOut() throws Exception { + public void testTimeOut() { Commandline cmd = getCommandline(TIME_OUT * 2); ej.setJavaCommand(cmd); long now = System.currentTimeMillis(); @@ -88,7 +88,7 @@ public class ExecuteJavaTest { } @Test - public void testNoTimeOutForked() throws Exception { + public void testNoTimeOutForked() { Commandline cmd = getCommandline(TIME_OUT / 2); ej.setJavaCommand(cmd); ej.fork(cp); @@ -97,7 +97,7 @@ public class ExecuteJavaTest { // test that the watchdog ends the process @Test - public void testTimeOutForked() throws Exception { + public void testTimeOutForked() { Commandline cmd = getCommandline(TIME_OUT * 2); ej.setJavaCommand(cmd); long now = System.currentTimeMillis(); diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/MoveTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/MoveTest.java index 37990031f..c09b6ba59 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/MoveTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/MoveTest.java @@ -91,12 +91,12 @@ public class MoveTest { } @Test - public void testCompleteDirectoryMove() throws IOException { + public void testCompleteDirectoryMove() { testCompleteDirectoryMove("testCompleteDirectoryMove"); } @Test - public void testCompleteDirectoryMove2() throws IOException { + public void testCompleteDirectoryMove2() { testCompleteDirectoryMove("testCompleteDirectoryMove2"); } diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/condition/IsReachableTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/condition/IsReachableTest.java index bef7ab160..6ddf26fe6 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/condition/IsReachableTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/condition/IsReachableTest.java @@ -42,39 +42,38 @@ public class IsReachableTest { "src/etc/testcases/taskdefs/conditions/isreachable.xml"); } - @Test public void testLocalhost() { buildRule.executeTarget("testLocalhost"); } @Test - public void testLocalhostURL() throws Exception { + public void testLocalhostURL() { buildRule.executeTarget("testLocalhostURL"); } @Test - public void testIpv4localhost() throws Exception { + public void testIpv4localhost() { buildRule.executeTarget("testIpv4localhost"); } @Test - public void testFTPURL() throws Exception { + public void testFTPURL() { buildRule.executeTarget("testFTPURL"); } @Test - public void testBoth() throws Exception { + public void testBoth() { try { buildRule.executeTarget("testBoth"); - fail("Build exception expected: error on two targets"); + fail("Build exception expected: error on two targets"); } catch (BuildException ex) { assertEquals(IsReachable.ERROR_BOTH_TARGETS, ex.getMessage()); } } @Test - public void testNoTargets() throws Exception { + public void testNoTargets() { try { buildRule.executeTarget("testNoTargets"); fail("Build exception expected: no params"); @@ -84,7 +83,7 @@ public class IsReachableTest { } @Test - public void testBadTimeout() throws Exception { + public void testBadTimeout() { try { buildRule.executeTarget("testBadTimeout"); fail("Build exception expected: error on -ve timeout"); @@ -95,7 +94,7 @@ public class IsReachableTest { @Test @Ignore("Previously named in a way to prevent execution") - public void NotestFile() throws Exception { + public void NotestFile() { try { buildRule.executeTarget("testFile"); fail("Build exception expected: error on file URL"); @@ -105,7 +104,7 @@ public class IsReachableTest { } @Test - public void testBadURL() throws Exception { + public void testBadURL() { try { buildRule.executeTarget("testBadURL"); fail("Build exception expected: error in URL"); diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParserTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParserTest.java index 4496bf028..e10a0ddc6 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParserTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParserTest.java @@ -50,7 +50,7 @@ public class ChangeLogParserTest { } @Test - public void testCvs112Format() throws Exception { + public void testCvs112Format() { parser.stdout("Working file: build.xml"); parser.stdout("revision 1.475"); parser.stdout("date: 2004-06-05 16:10:32 +0000; author: somebody; state: Exp; lines: +2 -2"); diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java index 0536c9aa4..1c2d445d2 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java @@ -193,13 +193,13 @@ public class EchoPropertiesTest { } @Test - public void testWithEmptyPrefixAndRegex() throws Exception { + public void testWithEmptyPrefixAndRegex() { buildRule.executeTarget("testEchoWithEmptyPrefixToLog"); assertContains("test.property=" + TEST_VALUE, buildRule.getLog()); } @Test - public void testWithRegex() throws Exception { + public void testWithRegex() { assumeTrue("Test skipped because no regexp matcher is present.", RegexpMatcherFactory.regexpMatcherPresent(buildRule.getProject())); buildRule.executeTarget("testWithRegex"); diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java index cac0f5b55..8ef6c7090 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java @@ -385,12 +385,12 @@ public class JUnitTaskTest { } @Test - public void testTestMethods() throws Exception { + public void testTestMethods() { buildRule.executeTarget("testTestMethods"); } @Test - public void testNonTestsSkipped() throws Exception { + public void testNonTestsSkipped() { buildRule.executeTarget("testNonTests"); assertFalse("Test result should not exist as test was skipped - TEST-org.example.junit.NonTestMissed.xml", diff --git a/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java b/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java index 30b62b444..72972642a 100644 --- a/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java @@ -312,7 +312,7 @@ public class XMLCatalogTest { } @Test - public void testResolverBase() throws MalformedURLException, TransformerException { + public void testResolverBase() throws TransformerException { String uri = "http://foo.com/bar/blah.xml"; String uriLoc = "etc/testcases/taskdefs/optional/xml/about.xml"; String base = toURLString(project.getBaseDir()) + "/src/";