提交 94fec712 authored 作者: noelgrandin's avatar noelgrandin

cleanup: remove unnecessary throws clauses

上级 b203816d
...@@ -51,7 +51,7 @@ public class TestWeb extends TestBase { ...@@ -51,7 +51,7 @@ public class TestWeb extends TestBase {
testWebApp(); testWebApp();
} }
private static void testWrongParameters() throws Exception { private static void testWrongParameters() {
new AssertThrows(ErrorCode.FEATURE_NOT_SUPPORTED_1) { new AssertThrows(ErrorCode.FEATURE_NOT_SUPPORTED_1) {
public void test() throws SQLException { public void test() throws SQLException {
Server.createPgServer("-pgPort 8182"); Server.createPgServer("-pgPort 8182");
......
...@@ -27,7 +27,7 @@ public class TestDataUtils extends TestBase { ...@@ -27,7 +27,7 @@ public class TestDataUtils extends TestBase {
TestBase.createCaller().init().test(); TestBase.createCaller().init().test();
} }
public void test() throws Exception { public void test() {
testEncodeLength(); testEncodeLength();
testFletcher(); testFletcher();
testMap(); testMap();
...@@ -37,7 +37,7 @@ public class TestDataUtils extends TestBase { ...@@ -37,7 +37,7 @@ public class TestDataUtils extends TestBase {
testPagePos(); testPagePos();
} }
private void testFletcher() throws Exception { private void testFletcher() {
byte[] data = new byte[10000]; byte[] data = new byte[10000];
for (int i = 0; i < 10000; i += 1000) { for (int i = 0; i < 10000; i += 1000) {
assertEquals(-1, DataUtils.getFletcher32(data, i)); assertEquals(-1, DataUtils.getFletcher32(data, i));
......
...@@ -1170,7 +1170,7 @@ public class TestMVStore extends TestBase { ...@@ -1170,7 +1170,7 @@ public class TestMVStore extends TestBase {
// System.out.println("len2: " + len); // System.out.println("len2: " + len);
} }
private void testReuseSpace() throws Exception { private void testReuseSpace() {
String fileName = getBaseDir() + "/testReuseSpace.h3"; String fileName = getBaseDir() + "/testReuseSpace.h3";
FileUtils.delete(fileName); FileUtils.delete(fileName);
long initialLength = 0; long initialLength = 0;
......
...@@ -180,7 +180,7 @@ public class TestTransactionStore extends TestBase { ...@@ -180,7 +180,7 @@ public class TestTransactionStore extends TestBase {
s.close(); s.close();
} }
private void testTwoPhaseCommit() throws Exception { private void testTwoPhaseCommit() {
String fileName = getBaseDir() + "/testTwoPhaseCommit.h3"; String fileName = getBaseDir() + "/testTwoPhaseCommit.h3";
FileUtils.delete(fileName); FileUtils.delete(fileName);
...@@ -251,7 +251,7 @@ public class TestTransactionStore extends TestBase { ...@@ -251,7 +251,7 @@ public class TestTransactionStore extends TestBase {
FileUtils.delete(fileName); FileUtils.delete(fileName);
} }
private void testSavepoint() throws Exception { private void testSavepoint() {
MVStore s = MVStore.open(null); MVStore s = MVStore.open(null);
TransactionStore ts = new TransactionStore(s); TransactionStore ts = new TransactionStore(s);
Transaction tx; Transaction tx;
......
...@@ -119,7 +119,7 @@ public class TestCompress extends TestBase { ...@@ -119,7 +119,7 @@ public class TestCompress extends TestBase {
} }
} }
private void testVariableEnd() throws Exception { private void testVariableEnd() {
CompressTool utils = CompressTool.getInstance(); CompressTool utils = CompressTool.getInstance();
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
for (int i = 0; i < 90; i++) { for (int i = 0; i < 90; i++) {
......
...@@ -41,7 +41,7 @@ public class TestConnectionInfo extends TestBase { ...@@ -41,7 +41,7 @@ public class TestConnectionInfo extends TestBase {
getConnection("jdbc:h2:mem:;init=runscript from 'wrong.file'"); getConnection("jdbc:h2:mem:;init=runscript from 'wrong.file'");
} }
private void testConnectionInfo() throws Exception { private void testConnectionInfo() {
Properties info = new Properties(); Properties info = new Properties();
ConnectionInfo connectionInfo = new ConnectionInfo( ConnectionInfo connectionInfo = new ConnectionInfo(
"jdbc:h2:mem:test" + "jdbc:h2:mem:test" +
......
...@@ -37,7 +37,7 @@ public class TestFile extends TestBase implements DataHandler { ...@@ -37,7 +37,7 @@ public class TestFile extends TestBase implements DataHandler {
doTest(true, true); doTest(true, true);
} }
private void doTest(boolean nioMem, boolean compress) throws Exception { private void doTest(boolean nioMem, boolean compress) {
int len = getSize(1000, 10000); int len = getSize(1000, 10000);
Random random = new Random(); Random random = new Random();
FileStore mem = null, file = null; FileStore mem = null, file = null;
......
...@@ -536,7 +536,7 @@ public class TestFileLockSerialized extends TestBase { ...@@ -536,7 +536,7 @@ public class TestFileLockSerialized extends TestBase {
deleteDb("fileLockSerialized"); deleteDb("fileLockSerialized");
} }
private void testBigDatabase(boolean withCache) throws Exception { private void testBigDatabase(boolean withCache) {
boolean longRun = false; boolean longRun = false;
final int howMuchRows = longRun ? 2000000 : 500000; final int howMuchRows = longRun ? 2000000 : 500000;
deleteDb("fileLockSerialized"); deleteDb("fileLockSerialized");
......
...@@ -36,11 +36,11 @@ public class TestObjectDeserialization extends TestBase { ...@@ -36,11 +36,11 @@ public class TestObjectDeserialization extends TestBase {
TestBase.createCaller().init().test(); TestBase.createCaller().init().test();
} }
public void test() throws Exception { public void test() {
testThreadContextClassLoader(); testThreadContextClassLoader();
} }
private void testThreadContextClassLoader() throws Exception { private void testThreadContextClassLoader() {
usesThreadContextClassLoader = false; usesThreadContextClassLoader = false;
Thread.currentThread().setContextClassLoader(new TestClassLoader()); Thread.currentThread().setContextClassLoader(new TestClassLoader());
try { try {
......
...@@ -108,7 +108,7 @@ public class TestUtils extends TestBase { ...@@ -108,7 +108,7 @@ public class TestUtils extends TestBase {
} }
} }
private void testGetNonPrimitiveClass() throws Exception { private void testGetNonPrimitiveClass() {
testGetNonPrimitiveClass(BigInteger.class, BigInteger.class); testGetNonPrimitiveClass(BigInteger.class, BigInteger.class);
testGetNonPrimitiveClass(Boolean.class, boolean.class); testGetNonPrimitiveClass(Boolean.class, boolean.class);
testGetNonPrimitiveClass(Byte.class, byte.class); testGetNonPrimitiveClass(Byte.class, byte.class);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论