OS.TARGET is now private and lazily initialized to avoid unnecessary file system access from the static initializer - fixes OpenHFT/Chronicle-Map#231

This commit is contained in:
Dmitry Pisklov
2020-09-25 13:21:00 +01:00
parent 77d1015380
commit 90bd3c527a
2 changed files with 2 additions and 2 deletions
@@ -28,7 +28,7 @@ import java.io.IOException;
public class Issue125Test {
@Test
public void test() throws IOException {
final File cacheRoot = new File(OS.TARGET + "/test.cm3");
final File cacheRoot = new File(OS.getTarget() + "/test.cm3");
ChronicleMapBuilder<byte[], byte[]> shaToNodeBuilder =
ChronicleMapBuilder.of(byte[].class, byte[].class)
// .name("bytes-to-bytes")
@@ -29,7 +29,7 @@ import static org.junit.Assert.assertEquals;
public class ExternalizableTest {
@Test
public void externalizable() throws IOException {
String path = OS.TARGET + "/test-" + System.nanoTime() + ".map";
String path = OS.getTarget() + "/test-" + System.nanoTime() + ".map";
new File(path).deleteOnExit();
try (ChronicleMap<Long, SomeClass> storage = ChronicleMapBuilder
.of(Long.class, SomeClass.class)