mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
create() and close() to not throw an IOException.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user