You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/11/27 13:41:36 UTC
[commons-vfs] 04/06: Camel-case internal name.
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
commit 5afec75b4f7a8fc4ac042fcfa751a7f982d4908e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 27 08:37:26 2021 -0500
Camel-case internal name.
---
.../org/apache/commons/vfs2/cache/DefaultFilesCache.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java
index 4da0aa4..fed6618 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java
@@ -45,7 +45,7 @@ import org.apache.commons.vfs2.FileSystem;
public class DefaultFilesCache extends AbstractFilesCache {
/** The FileSystem cache. Keeps one Map for each FileSystem. */
- private final ConcurrentMap<FileSystem, ConcurrentMap<FileName, FileObject>> filesystemCache = new ConcurrentHashMap<>(
+ private final ConcurrentMap<FileSystem, ConcurrentMap<FileName, FileObject>> fileSystemCache = new ConcurrentHashMap<>(
10);
@Override
@@ -63,7 +63,7 @@ public class DefaultFilesCache extends AbstractFilesCache {
@Override
public FileObject getFile(final FileSystem filesystem, final FileName name) {
// avoid creating filesystem entry for empty filesystem cache:
- final Map<FileName, FileObject> files = filesystemCache.get(filesystem);
+ final Map<FileName, FileObject> files = fileSystemCache.get(filesystem);
if (files == null) {
// cache for filesystem is not known => file is not cached:
return null;
@@ -75,18 +75,18 @@ public class DefaultFilesCache extends AbstractFilesCache {
@Override
public void clear(final FileSystem filesystem) {
// avoid keeping a reference to the FileSystem (key) object
- final Map<FileName, FileObject> files = filesystemCache.remove(filesystem);
+ final Map<FileName, FileObject> files = fileSystemCache.remove(filesystem);
if (files != null) {
files.clear(); // help GC
}
}
protected ConcurrentMap<FileName, FileObject> getOrCreateFilesystemCache(final FileSystem filesystem) {
- ConcurrentMap<FileName, FileObject> files = filesystemCache.get(filesystem);
+ ConcurrentMap<FileName, FileObject> files = fileSystemCache.get(filesystem);
// we loop to make sure we never return null even when concurrent clean is called
while (files == null) {
- filesystemCache.putIfAbsent(filesystem, new ConcurrentHashMap<>(200, 0.75f, 8));
- files = filesystemCache.get(filesystem);
+ fileSystemCache.putIfAbsent(filesystem, new ConcurrentHashMap<>(200, 0.75f, 8));
+ files = fileSystemCache.get(filesystem);
}
return files;
@@ -95,13 +95,13 @@ public class DefaultFilesCache extends AbstractFilesCache {
@Override
public void close() {
super.close();
- filesystemCache.clear();
+ fileSystemCache.clear();
}
@Override
public void removeFile(final FileSystem filesystem, final FileName name) {
// avoid creating filesystem entry for empty filesystem cache:
- final Map<FileName, FileObject> files = filesystemCache.get(filesystem);
+ final Map<FileName, FileObject> files = fileSystemCache.get(filesystem);
if (files != null) {
files.remove(name);
// This would be too racey: