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

cleanup: remove unnecessary throws clauses

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