moved WeakValuedCache to commons

This commit is contained in:
Sebastian Stenzel
2016-01-10 15:04:35 +01:00
parent b2d425e11f
commit 560c6251f6
5 changed files with 14 additions and 4 deletions

View File

@@ -14,6 +14,11 @@
<description>Shared utilities</description>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -30,5 +35,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@@ -1,4 +1,4 @@
package org.cryptomator.filesystem.nio;
package org.cryptomator.common;
import java.util.concurrent.ExecutionException;
import java.util.function.Function;
@@ -9,7 +9,7 @@ import com.google.common.cache.LoadingCache;
import com.google.common.util.concurrent.ExecutionError;
import com.google.common.util.concurrent.UncheckedExecutionException;
class WeakValuedCache<Key, Value> {
public class WeakValuedCache<Key, Value> {
private final LoadingCache<Key, Value> delegate;

View File

@@ -1,4 +1,4 @@
package org.cryptomator.filesystem.nio;
package org.cryptomator.common;
import static java.lang.String.format;
import static org.hamcrest.CoreMatchers.is;
@@ -9,6 +9,7 @@ import static org.mockito.Mockito.when;
import java.util.function.Function;
import org.cryptomator.common.WeakValuedCache;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;

View File

@@ -14,6 +14,10 @@
<description>FileSystem implementation to access the real file system of an operating system</description>
<dependencies>
<dependency>
<groupId>org.cryptomator</groupId>
<artifactId>commons</artifactId>
</dependency>
<dependency>
<groupId>org.cryptomator</groupId>
<artifactId>filesystem-api</artifactId>

View File

@@ -9,6 +9,7 @@ import java.time.Instant;
import java.util.Optional;
import java.util.stream.Stream;
import org.cryptomator.common.WeakValuedCache;
import org.cryptomator.filesystem.File;
import org.cryptomator.filesystem.Folder;
import org.cryptomator.filesystem.Node;