From 87449b7d99b331516ade8986bae524bd06828210 Mon Sep 17 00:00:00 2001 From: Peter Lawrey Date: Sun, 28 Jun 2015 18:52:05 +0100 Subject: [PATCH] Replace "throws Exception" with the specific Exception(s) thrown. Conflicts: src/main/java/net/openhft/chronicle/map/EngineReplicationLangBytes.java src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java src/test/java/net/openhft/chronicle/map/ChronicleMapTest.java src/test/java/net/openhft/chronicle/map/IntIntMultiMapTest.java --- .../internal/DataValueBytesMarshallers.java | 4 +-- .../chronicle/map/StatelessChronicleMap.java | 2 +- .../chronicle/map/AcquireGetUsingMain.java | 3 +- .../openhft/chronicle/map/BitUnitTest.java | 6 ++-- .../net/openhft/chronicle/map/CHMTest5.java | 3 +- .../chronicle/map/CHMTestIterator1.java | 2 +- .../chronicle/map/ChronicleMapTest.java | 28 +++++++++---------- .../chronicle/map/ConcurrentMap8Test.java | 2 +- .../chronicle/map/DemoChronicleMapTest.java | 5 ++-- .../chronicle/map/EntryCountMapTest.java | 13 ++++----- .../map/ProcessInstanceLimiterMain.java | 2 +- .../map/ReplicatedChronicleMapTest.java | 2 +- .../openhft/chronicle/map/SerializerTest.java | 10 +++---- .../TcpReplicationWithAcquireContextTest.java | 6 ++-- .../chronicle/map/TestReplication.java | 3 +- .../map/ipc/StateMachineTutorial.java | 2 +- .../chronicle/map/jsr166/JSR166TestCase.java | 5 ++-- .../map/jsr166/map/ChronicleMapTest.java | 2 +- .../chronicle/map/jsr166/map/MapCheck.java | 4 +-- .../map/utility/ProcessInstanceLimiter.java | 2 +- .../set/ChronicleSetBuilderTest.java | 2 +- 21 files changed, 55 insertions(+), 53 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/DataValueBytesMarshallers.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/DataValueBytesMarshallers.java index 31de82a6e..baa005605 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/DataValueBytesMarshallers.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/DataValueBytesMarshallers.java @@ -180,7 +180,7 @@ public final class DataValueBytesMarshallers { " }\n" + "\n" + " @Override\n" + - " " + simpleName + " getInstance() throws Exception {\n" + + " " + simpleName + " getInstance() {\n" + " return factory.create();\n" + " }\n" + "}\n"; @@ -530,7 +530,7 @@ public final class DataValueBytesMarshallers { private static void generateGetInstance(StringBuilder sb, Class cl) { sb.append(" ").append(cl.getCanonicalName()) - .append(" getInstance() throws Exception {\n"); + .append(" getInstance() {\n"); sb.append(" ").append("return new ").append(cl.getName()).append("$$Native();\n"); sb.append(" ").append("}\n\n"); } diff --git a/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java b/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java index 6053ce4d0..11f05375c 100644 --- a/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java @@ -1886,7 +1886,7 @@ class StatelessChronicleMap implements ChronicleMap, Closeable, Clon } } - private void resizeToMessageOutBuffer(long start, @NotNull Exception e) throws Exception { + private void resizeToMessageOutBuffer(long start, @NotNull T e) throws T { assert outBytesLock.isHeldByCurrentThread(); assert !inBytesLock.isHeldByCurrentThread(); String message = e.getMessage(); diff --git a/src/test/java/net/openhft/chronicle/map/AcquireGetUsingMain.java b/src/test/java/net/openhft/chronicle/map/AcquireGetUsingMain.java index a576d44de..846ab8db0 100644 --- a/src/test/java/net/openhft/chronicle/map/AcquireGetUsingMain.java +++ b/src/test/java/net/openhft/chronicle/map/AcquireGetUsingMain.java @@ -21,11 +21,12 @@ import net.openhft.lang.model.DataValueClasses; import net.openhft.lang.model.constraints.MaxSize; import java.io.File; +import java.io.IOException; import static org.junit.Assert.fail; public class AcquireGetUsingMain { - public static void main(String[] args) throws Exception { + public static void main(String[] args) throws IOException { File file = new File(System.getProperty("java.io.tmpdir") + "/test1"); ChronicleMap theSharedMap = ChronicleMapBuilder.of(String.class, Data.class) diff --git a/src/test/java/net/openhft/chronicle/map/BitUnitTest.java b/src/test/java/net/openhft/chronicle/map/BitUnitTest.java index cd8627ef8..4f0186864 100644 --- a/src/test/java/net/openhft/chronicle/map/BitUnitTest.java +++ b/src/test/java/net/openhft/chronicle/map/BitUnitTest.java @@ -20,12 +20,12 @@ import junit.framework.TestCase; public class BitUnitTest extends TestCase { - public void testToBits() throws Exception { + public void testToBits() { } - public void testToMegaBits() throws Exception { + public void testToMegaBits() { } - public void testToGigaBits() throws Exception { + public void testToGigaBits() { } } \ No newline at end of file diff --git a/src/test/java/net/openhft/chronicle/map/CHMTest5.java b/src/test/java/net/openhft/chronicle/map/CHMTest5.java index 1ceec563f..5fee7b7bd 100644 --- a/src/test/java/net/openhft/chronicle/map/CHMTest5.java +++ b/src/test/java/net/openhft/chronicle/map/CHMTest5.java @@ -20,6 +20,7 @@ import net.openhft.lang.model.DataValueClasses; import net.openhft.lang.model.constraints.MaxSize; import java.io.File; +import java.io.IOException; import static org.junit.Assert.assertEquals; @@ -30,7 +31,7 @@ public class CHMTest5 { public static final String TEST_KEY = "whatever"; public static int NUMBER_OF_PROCESSES_ALLOWED = 2; - public static void main(String[] args) throws Exception { + public static void main(String[] args) throws IOException { //First create (or access if already created) the shared map ChronicleMapBuilder builder = ChronicleMapBuilder.of(String.class, CHMTest5Data.class) diff --git a/src/test/java/net/openhft/chronicle/map/CHMTestIterator1.java b/src/test/java/net/openhft/chronicle/map/CHMTestIterator1.java index 606960f1e..4c21f6f66 100644 --- a/src/test/java/net/openhft/chronicle/map/CHMTestIterator1.java +++ b/src/test/java/net/openhft/chronicle/map/CHMTestIterator1.java @@ -24,7 +24,7 @@ import java.util.concurrent.atomic.AtomicLong; */ public class CHMTestIterator1 { - public static void main(String[] args) throws Exception { + public static void main(String[] args) { AtomicLong alValue = new AtomicLong(); AtomicLong alKey = new AtomicLong(); int runs = 3000000; diff --git a/src/test/java/net/openhft/chronicle/map/ChronicleMapTest.java b/src/test/java/net/openhft/chronicle/map/ChronicleMapTest.java index 2e47702ea..0d63d3fa2 100755 --- a/src/test/java/net/openhft/chronicle/map/ChronicleMapTest.java +++ b/src/test/java/net/openhft/chronicle/map/ChronicleMapTest.java @@ -142,7 +142,7 @@ public class ChronicleMapTest { } @Test - public void testRemoveWithKey() throws Exception { + public void testRemoveWithKey() { try (final ChronicleMap map = ChronicleMapBuilder @@ -189,7 +189,7 @@ public class ChronicleMapTest { @Test - public void testByteArrayPersistenceFileReuse() throws Exception { + public void testByteArrayPersistenceFileReuse() throws IOException { final File persistenceFile = Builder.getPersistenceFile(); for (int i = 0; i < 3; i++) { @@ -206,7 +206,7 @@ public class ChronicleMapTest { } @Test - public void testEqualsCharSequence() throws Exception { + public void testEqualsCharSequence() { ChronicleMapBuilder builder = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class); @@ -224,7 +224,7 @@ public class ChronicleMapTest { } @Test - public void testEqualsCharArray() throws Exception { + public void testEqualsCharArray() { char[] value = new char[5]; Arrays.fill(value, 'X'); @@ -246,7 +246,7 @@ public class ChronicleMapTest { @Test - public void testEqualsByteArray() throws Exception { + public void testEqualsByteArray() { byte[] value = new byte[5]; Arrays.fill(value, (byte) 'X'); @@ -268,7 +268,7 @@ public class ChronicleMapTest { @Test - public void testSize() throws Exception { + public void testSize() { try (final ChronicleMap map = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class) @@ -314,7 +314,7 @@ public class ChronicleMapTest { } @Test - public void testRemoveWithKeyAndRemoveReturnsNull() throws Exception { + public void testRemoveWithKeyAndRemoveReturnsNull() { try (final ChronicleMap map = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class) @@ -360,7 +360,7 @@ public class ChronicleMapTest { } @Test - public void testReplaceWithKey() throws Exception { + public void testReplaceWithKey() { try (final ChronicleMap map = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class) @@ -424,7 +424,7 @@ public class ChronicleMapTest { } @Test - public void testReplaceWithKeyAnd2Params() throws Exception { + public void testReplaceWithKeyAnd2Params() { try (final ChronicleMap map = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class) @@ -466,7 +466,7 @@ public class ChronicleMapTest { } @Test - public void testRemoveWithKeyAndValue() throws Exception { + public void testRemoveWithKeyAndValue() { try (final ChronicleMap map = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class) @@ -504,7 +504,7 @@ public class ChronicleMapTest { @Test @Ignore("TODO clarify requrements -- if acquireUsing() should work with null value") - public void testAcquireWithNullContainer() throws Exception { + public void testAcquireWithNullContainer() { try (ChronicleMap map = ChronicleMapBuilder.of(CharSequence.class, LongValue.class) .entries(1000) @@ -547,7 +547,7 @@ public class ChronicleMapTest { // 1000M users, updated 16 times, Throughput 1.3 M ops/sec, TODO FIX this @Test - public void testGetWithNullContainer() throws Exception { + public void testGetWithNullContainer() { try (ChronicleMap map = ChronicleMapBuilder.of(CharSequence.class, LongValue.class) .entries(10) @@ -560,7 +560,7 @@ public class ChronicleMapTest { } @Test - public void testGetWithoutAcquireFirst() throws Exception { + public void testGetWithoutAcquireFirst() { try (ChronicleMap map = ChronicleMapBuilder.of(CharSequence.class, LongValue.class) .entries(10) @@ -696,7 +696,7 @@ public class ChronicleMapTest { @Ignore("Possible candidate for TC JVM crashes") @Test - public void testAcquireFromMultipleThreads() throws Exception { + public void testAcquireFromMultipleThreads() throws InterruptedException { int entries = 1000 * 1000; try (ChronicleMap map2 = ChronicleMapBuilder.of(CharSequence.class, LongValue.class) diff --git a/src/test/java/net/openhft/chronicle/map/ConcurrentMap8Test.java b/src/test/java/net/openhft/chronicle/map/ConcurrentMap8Test.java index ead22e487..6b61a39b0 100644 --- a/src/test/java/net/openhft/chronicle/map/ConcurrentMap8Test.java +++ b/src/test/java/net/openhft/chronicle/map/ConcurrentMap8Test.java @@ -589,7 +589,7 @@ public class ConcurrentMap8Test extends JSR166TestCase { * A deserialized serialized set is equal *//* @Test - public void testSerialization() throws Exception { + public void testSerialization() { int size = 20; Set x = populatedSet(size); Set y = serialClone(x); diff --git a/src/test/java/net/openhft/chronicle/map/DemoChronicleMapTest.java b/src/test/java/net/openhft/chronicle/map/DemoChronicleMapTest.java index 4a6ab02ed..fe32d78d8 100755 --- a/src/test/java/net/openhft/chronicle/map/DemoChronicleMapTest.java +++ b/src/test/java/net/openhft/chronicle/map/DemoChronicleMapTest.java @@ -22,6 +22,7 @@ import net.openhft.lang.values.IntValue; import org.junit.Test; import java.io.File; +import java.io.IOException; import java.util.Map; import static net.openhft.lang.model.DataValueClasses.newDirectReference; @@ -30,7 +31,7 @@ import static org.junit.Assert.*; public class DemoChronicleMapTest { @Test - public void testMap() throws Exception { + public void testMap() throws IOException { File file = File.createTempFile("DummyOrders"+System.currentTimeMillis(), ".test"); file.deleteOnExit(); int maxEntries = 1000; @@ -72,7 +73,7 @@ public class DemoChronicleMapTest { } @Test - public void testMapLocked() throws Exception { + public void testMapLocked() throws IOException { File file = File.createTempFile("DummyOrders-"+System.currentTimeMillis(), ".test"); file.deleteOnExit(); int maxEntries = 1000; diff --git a/src/test/java/net/openhft/chronicle/map/EntryCountMapTest.java b/src/test/java/net/openhft/chronicle/map/EntryCountMapTest.java index f0a6379c1..3ed4c9fa3 100644 --- a/src/test/java/net/openhft/chronicle/map/EntryCountMapTest.java +++ b/src/test/java/net/openhft/chronicle/map/EntryCountMapTest.java @@ -26,10 +26,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Random; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; +import java.util.concurrent.*; import static java.lang.Math.log10; import static java.lang.Math.round; @@ -62,7 +59,7 @@ public class EntryCountMapTest { @Ignore("HCOLL-279 fix net.openhft.chronicle.map.EntryCountMapTest#testVerySmall") @Test - public void testVerySmall() throws Exception { + public void testVerySmall() throws IOException { System.out.print("testVerySmall seeds"); for (int t = 0; t < ecmTests; t++) { System.out.print("."); @@ -112,7 +109,7 @@ public class EntryCountMapTest { } @Test - public void testSmall() throws Exception { + public void testSmall() throws IOException, ExecutionException, InterruptedException { System.out.print("testSmall seeds"); int procs = Runtime.getRuntime().availableProcessors(); ExecutorService es = Executors.newFixedThreadPool(procs); @@ -156,7 +153,7 @@ public class EntryCountMapTest { @Ignore("Long running, large tests test") @Test - public void testMedium() throws Exception { + public void testMedium() throws IOException, ExecutionException, InterruptedException { System.out.print("testMedium seeds"); int procs = Runtime.getRuntime().availableProcessors(); ExecutorService es = Executors.newFixedThreadPool(procs); @@ -194,7 +191,7 @@ public class EntryCountMapTest { return es.submit(new Callable() { @Override - public Void call() throws Exception { + public Void call() { File f = null; try (final ChronicleMap map = getSharedMap(minSize, segments, maxKeySize)) { diff --git a/src/test/java/net/openhft/chronicle/map/ProcessInstanceLimiterMain.java b/src/test/java/net/openhft/chronicle/map/ProcessInstanceLimiterMain.java index 966a0591e..77e80b9b1 100644 --- a/src/test/java/net/openhft/chronicle/map/ProcessInstanceLimiterMain.java +++ b/src/test/java/net/openhft/chronicle/map/ProcessInstanceLimiterMain.java @@ -45,7 +45,7 @@ public class ProcessInstanceLimiterMain implements Runnable { t.start(); } - public static void main(String[] args) throws Exception { + public static void main(String[] args) throws IOException, InterruptedException { Callback callback = new Callback() { public void tooManyProcessesOfType(String processType) { System.out.println("Too many processes of type " + processType + " have been started, so exiting this process"); diff --git a/src/test/java/net/openhft/chronicle/map/ReplicatedChronicleMapTest.java b/src/test/java/net/openhft/chronicle/map/ReplicatedChronicleMapTest.java index 500876029..0bb21e3fe 100644 --- a/src/test/java/net/openhft/chronicle/map/ReplicatedChronicleMapTest.java +++ b/src/test/java/net/openhft/chronicle/map/ReplicatedChronicleMapTest.java @@ -779,7 +779,7 @@ public class ReplicatedChronicleMapTest extends JSR166TestCase { /** * A deserialized map equals original */ - /* @Test public void testSerialization() throws Exception { + /* @Test public void testSerialization() { Map x = map5(); Map y = serialClone(x); diff --git a/src/test/java/net/openhft/chronicle/map/SerializerTest.java b/src/test/java/net/openhft/chronicle/map/SerializerTest.java index 296ad4005..90af6eff4 100644 --- a/src/test/java/net/openhft/chronicle/map/SerializerTest.java +++ b/src/test/java/net/openhft/chronicle/map/SerializerTest.java @@ -34,7 +34,7 @@ import static org.junit.Assert.assertEquals; public class SerializerTest { @Test - public void testPrefixStringFunctionSerialization() throws Exception { + public void testPrefixStringFunctionSerialization() { ByteBufferBytes b = new ByteBufferBytes(ByteBuffer.allocate(512)); @@ -65,7 +65,7 @@ public class SerializerTest { @Test - public void testValueMarshallable() throws Exception { + public void testValueMarshallable() { testReadWriteValue("Test"); testReadWriteValue(1); testReadWriteValue(1L); @@ -81,7 +81,7 @@ public class SerializerTest { } @Test - public void testKeyMarshallable() throws Exception { + public void testKeyMarshallable() { testReadWriteKey("Test"); testReadWriteKey(1); testReadWriteKey(1L); @@ -96,7 +96,7 @@ public class SerializerTest { testReadWriteKey(new MyTestClassObjectGraph(3)); } - public void testReadWriteValue(Object value) throws Exception { + public void testReadWriteValue(Object value) { Class valueClass = value.getClass(); @@ -120,7 +120,7 @@ public class SerializerTest { Assert.assertEquals(actual, value); } - public void testReadWriteKey(Object key) throws Exception { + public void testReadWriteKey(Object key) { Class clazz = key.getClass(); diff --git a/src/test/java/net/openhft/chronicle/map/TcpReplicationWithAcquireContextTest.java b/src/test/java/net/openhft/chronicle/map/TcpReplicationWithAcquireContextTest.java index c0df6c096..039a6e6dd 100644 --- a/src/test/java/net/openhft/chronicle/map/TcpReplicationWithAcquireContextTest.java +++ b/src/test/java/net/openhft/chronicle/map/TcpReplicationWithAcquireContextTest.java @@ -30,7 +30,7 @@ public class TcpReplicationWithAcquireContextTest { @Test - public void testReplicationWithAcquireUsingLocked() throws Exception { + public void testReplicationWithAcquireUsingLocked() throws InterruptedException { TcpTransportAndNetworkConfig config1 = TcpTransportAndNetworkConfig.of(8076); @@ -85,7 +85,7 @@ public class TcpReplicationWithAcquireContextTest { @Test - public void testReplicationWithEmptyOffHeapObject() throws Exception { + public void testReplicationWithEmptyOffHeapObject() throws InterruptedException { TcpTransportAndNetworkConfig config1 = TcpTransportAndNetworkConfig.of(8076); @@ -138,7 +138,7 @@ public class TcpReplicationWithAcquireContextTest { @Test - public void testReplicationWithOffHeapObject() throws Exception { + public void testReplicationWithOffHeapObject() throws InterruptedException { TcpTransportAndNetworkConfig config1 = TcpTransportAndNetworkConfig.of(8076); diff --git a/src/test/java/net/openhft/chronicle/map/TestReplication.java b/src/test/java/net/openhft/chronicle/map/TestReplication.java index 9b06da7df..356f9e633 100644 --- a/src/test/java/net/openhft/chronicle/map/TestReplication.java +++ b/src/test/java/net/openhft/chronicle/map/TestReplication.java @@ -21,6 +21,7 @@ import org.junit.Assert; import org.junit.Test; import java.io.File; +import java.io.IOException; import java.net.InetSocketAddress; /** @@ -70,7 +71,7 @@ public class TestReplication { * memory with the maps that is doing the update */ @Test - public void testReplicationUsingAProxyMapThatsUpdatedViaSharedMemory() throws Exception { + public void testReplicationUsingAProxyMapThatsUpdatedViaSharedMemory() throws IOException { ChronicleMap server1 = null; ChronicleMap server2 = null; diff --git a/src/test/java/net/openhft/chronicle/map/ipc/StateMachineTutorial.java b/src/test/java/net/openhft/chronicle/map/ipc/StateMachineTutorial.java index b63c19ac9..17f03cc3b 100644 --- a/src/test/java/net/openhft/chronicle/map/ipc/StateMachineTutorial.java +++ b/src/test/java/net/openhft/chronicle/map/ipc/StateMachineTutorial.java @@ -33,7 +33,7 @@ public class StateMachineTutorial { // // ************************************************************************* - public static void main(String[] args) throws Exception { + public static void main(String[] args) { ChronicleMap map = null; try { diff --git a/src/test/java/net/openhft/chronicle/map/jsr166/JSR166TestCase.java b/src/test/java/net/openhft/chronicle/map/jsr166/JSR166TestCase.java index a7ea077a0..6a94fb199 100644 --- a/src/test/java/net/openhft/chronicle/map/jsr166/JSR166TestCase.java +++ b/src/test/java/net/openhft/chronicle/map/jsr166/JSR166TestCase.java @@ -17,6 +17,7 @@ package net.openhft.chronicle.map.jsr166; import junit.framework.AssertionFailedError; +import net.openhft.lang.Jvm; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -261,7 +262,7 @@ public class JSR166TestCase { * Triggers test case Assert.failure if interrupt status is set in the main thread. */ @After - public void tearDown() throws Exception { + public void tearDown() throws InterruptedException { Throwable t = threadFailure.getAndSet(null); if (t != null) { if (t instanceof Error) @@ -269,7 +270,7 @@ public class JSR166TestCase { else if (t instanceof RuntimeException) throw (RuntimeException) t; else if (t instanceof Exception) - throw (Exception) t; + throw Jvm.rethrow(t); else { AssertionFailedError afe = new AssertionFailedError(t.toString()); diff --git a/src/test/java/net/openhft/chronicle/map/jsr166/map/ChronicleMapTest.java b/src/test/java/net/openhft/chronicle/map/jsr166/map/ChronicleMapTest.java index ca1a15ea9..2359820e7 100644 --- a/src/test/java/net/openhft/chronicle/map/jsr166/map/ChronicleMapTest.java +++ b/src/test/java/net/openhft/chronicle/map/jsr166/map/ChronicleMapTest.java @@ -673,7 +673,7 @@ public class ChronicleMapTest extends JSR166TestCase { /** * A deserialized map equals original */ - /* @Test public void testSerialization() throws Exception { + /* @Test public void testSerialization() { Map x = map5(); Map y = serialClone(x); diff --git a/src/test/java/net/openhft/chronicle/map/jsr166/map/MapCheck.java b/src/test/java/net/openhft/chronicle/map/jsr166/map/MapCheck.java index 599ff0f7f..f2c1855be 100644 --- a/src/test/java/net/openhft/chronicle/map/jsr166/map/MapCheck.java +++ b/src/test/java/net/openhft/chronicle/map/jsr166/map/MapCheck.java @@ -51,7 +51,7 @@ public class MapCheck { if (!b) throw new Error("Failed Assertion"); } - public static void main(String[] args) throws Exception { + public static void main(String[] args) throws IOException, ClassNotFoundException { int numTests = 20; int size = 36864; // about midway of HashMap resize interval @@ -360,7 +360,7 @@ public class MapCheck { reallyAssert(src.size() == dst.size()); } - static void serTest(int size) throws Exception { + static void serTest(int size) throws IOException, ClassNotFoundException { Map s = newMap(); if (!(s instanceof Serializable)) return; diff --git a/src/test/java/net/openhft/chronicle/map/utility/ProcessInstanceLimiter.java b/src/test/java/net/openhft/chronicle/map/utility/ProcessInstanceLimiter.java index a0ae1854b..d51f223d9 100644 --- a/src/test/java/net/openhft/chronicle/map/utility/ProcessInstanceLimiter.java +++ b/src/test/java/net/openhft/chronicle/map/utility/ProcessInstanceLimiter.java @@ -142,7 +142,7 @@ public class ProcessInstanceLimiter implements Runnable { t.start(); } - public static void main(String[] args) throws Exception { + public static void main(String[] args) throws IOException, InterruptedException { ProcessInstanceLimiter.limitTo(2); Thread.sleep(60L * 1000L); } diff --git a/src/test/java/net/openhft/chronicle/set/ChronicleSetBuilderTest.java b/src/test/java/net/openhft/chronicle/set/ChronicleSetBuilderTest.java index 1912ccfaa..1b9a21074 100644 --- a/src/test/java/net/openhft/chronicle/set/ChronicleSetBuilderTest.java +++ b/src/test/java/net/openhft/chronicle/set/ChronicleSetBuilderTest.java @@ -22,7 +22,7 @@ import org.junit.Test; public class ChronicleSetBuilderTest { @Test - public void test() throws Exception { + public void test() { try (ChronicleSet integers = ChronicleSetBuilder.of(Integer.class).create()) { for (int i = 0; i < 10; i++) {