create() and close() to not throw an IOException.

This commit is contained in:
Peter Lawrey
2014-11-15 10:40:09 +00:00
parent 014a5fd154
commit 524834f1c2
6 changed files with 18 additions and 24 deletions
@@ -27,7 +27,6 @@ import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -106,22 +105,14 @@ public class GuavaTest extends TestCase {
@Override
Map<CharSequence, CharSequence> newMap() {
try {
return builder.create();
} catch (IOException e) {
throw new AssertionError(e);
}
return builder.create();
}
}
static class HHMTestGenerator extends CHMTestGenerator {
@Override
Map<CharSequence, CharSequence> newMap() {
try {
return builder.create();
} catch (IOException e) {
throw new AssertionError(e);
}
return builder.create();
}
}
}
@@ -22,7 +22,6 @@ import org.jetbrains.annotations.NotNull;
import org.junit.Assert;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
@@ -268,7 +267,7 @@ public class ReplicationCheckingMap<K, V> implements ChronicleMap<K, V> {
}
@Override
public void close() throws IOException {
public void close() {
map1.close();
map2.close();
}
@@ -68,7 +68,7 @@ public class StatelessChronicleMapTest extends JSR166TestCase {
}
@Override
public void close() throws IOException {
public void close() {
for (Closeable c : closeables) {
try {
c.close();