Skip to content

Commit

Permalink
Use a more portable way of defining the tmp dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
adejanovski committed Dec 12, 2024
1 parent d0fb42c commit 7546ad4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import java.util.UUID;
import java.util.stream.Collectors;

import com.google.common.io.Files;
import org.eclipse.serializer.persistence.types.PersistenceFieldEvaluator;
import org.eclipse.store.storage.embedded.types.EmbeddedStorage;
import org.eclipse.store.storage.embedded.types.EmbeddedStorageManager;
Expand Down Expand Up @@ -111,15 +112,15 @@ public MemoryStorageFacade(String persistenceStoragePath, long leadTime) {
}

public MemoryStorageFacade() {
this("/tmp/" + UUID.randomUUID().toString(), DEFAULT_LEAD_TIME);
this(Files.createTempDir().getAbsolutePath(), DEFAULT_LEAD_TIME);
}

public MemoryStorageFacade(String persistenceStoragePath) {
this(persistenceStoragePath, DEFAULT_LEAD_TIME);
}

public MemoryStorageFacade(long leadTime) {
this("/tmp/" + UUID.randomUUID().toString(), leadTime);
this(Files.createTempDir().getAbsolutePath(), leadTime);
}

@Override
Expand Down

0 comments on commit 7546ad4

Please sign in to comment.