garydgregory commented on a change in pull request #154:
URL: https://github.com/apache/commons-vfs/pull/154#discussion_r553323254
##########
File path:
commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java
##########
@@ -43,85 +38,55 @@
*/
public class SoftRefFilesCache extends AbstractFilesCache {
- private static final int TIMEOUT = 1000;
-
private static final Log log = LogFactory.getLog(SoftRefFilesCache.class);
- private final ConcurrentMap<FileSystem, Map<FileName,
Reference<FileObject>>> fileSystemCache = new ConcurrentHashMap<>();
+ private final Map<FileSystem, Map<FileName, Reference<FileObject>>>
fileSystemCache = new HashMap<>();
private final Map<Reference<FileObject>, FileSystemAndNameKey>
refReverseMap = new HashMap<>(100);
private final ReferenceQueue<FileObject> refQueue = new ReferenceQueue<>();
- private volatile SoftRefReleaseThread softRefReleaseThread = null; //
@GuardedBy("lock")
-
- private final Lock lock = new ReentrantLock();
+ private SoftRefReleaseThread softRefReleaseThread = null;
Review comment:
Please don't initialize to default values.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]