This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
The following commit(s) were added to refs/heads/master by this push: new 6fe765a Use Java 8 API. Remove unused import. 6fe765a is described below commit 6fe765a2242f8178fe930006768f79958f261e96 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Mar 5 15:44:29 2021 -0500 Use Java 8 API. Remove unused import. --- .../java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java index 83d0ad3..4e2da10 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java @@ -28,7 +28,6 @@ import org.apache.commons.logging.LogFactory; import org.apache.commons.vfs2.FileName; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystem; -import org.apache.commons.vfs2.util.Messages; /** * This implementation caches every file as long as it is strongly reachable by the java vm. As soon as the vm needs @@ -238,12 +237,6 @@ public class SoftRefFilesCache extends AbstractFilesCache { startThread(); } - Map<FileName, Reference<FileObject>> files = fileSystemCache.get(fileSystem); - if (files == null) { - files = new HashMap<>(); - fileSystemCache.put(fileSystem, files); - } - - return files; + return fileSystemCache.computeIfAbsent(fileSystem, k -> new HashMap<>()); } }