commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1364506 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java
Date Mon, 23 Jul 2012 05:51:36 GMT
Author: ggregory
Date: Mon Jul 23 05:51:35 2012
New Revision: 1364506

URL: http://svn.apache.org/viewvc?rev=1364506&view=rev
Log:
Chnage names of FileName params from "name" to "fileName".
Chnage names of FileObject params from "file" to "fileObject".

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java?rev=1364506&r1=1364505&r2=1364506&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java
Mon Jul 23 05:51:35 2012
@@ -157,22 +157,22 @@ public class SoftRefFilesCache extends A
     }
 
     @Override
-    public void putFile(final FileObject file)
+    public void putFile(final FileObject fileObject)
     {
         if (log.isDebugEnabled())
         {
-            log.debug("putFile: " + this.getSafeName(file));
+            log.debug("putFile: " + this.getSafeName(fileObject));
         }
 
-        Map<FileName, Reference<FileObject>> files = getOrCreateFilesystemCache(file.getFileSystem());
+        Map<FileName, Reference<FileObject>> files = getOrCreateFilesystemCache(fileObject.getFileSystem());
 
-        Reference<FileObject> ref = createReference(file, refQueue);
-        FileSystemAndNameKey key = new FileSystemAndNameKey(file.getFileSystem(), file.getName());
+        Reference<FileObject> ref = createReference(fileObject, refQueue);
+        FileSystemAndNameKey key = new FileSystemAndNameKey(fileObject.getFileSystem(), fileObject.getName());
 
         lock.lock();
         try
         {
-            Reference<FileObject> old = files.put(file.getName(), ref);
+            Reference<FileObject> old = files.put(fileObject.getName(), ref);
             if (old != null)
             {
                 refReverseMap.remove(old);
@@ -185,37 +185,37 @@ public class SoftRefFilesCache extends A
         }
     }
 
-    private String getSafeName(final FileName file)
+    private String getSafeName(final FileName fileName)
     {
-        return file.getFriendlyURI();
+        return fileName.getFriendlyURI();
     }
 
-    private String getSafeName(final FileObject file)
+    private String getSafeName(final FileObject fileObject)
     {
-        return this.getSafeName(file.getName());
+        return this.getSafeName(fileObject.getName());
     }
 
     @Override
-    public boolean putFileIfAbsent(final FileObject file)
+    public boolean putFileIfAbsent(final FileObject fileObject)
     {
         if (log.isDebugEnabled())
         {
-            log.debug("putFile: " + this.getSafeName(file));
+            log.debug("putFile: " + this.getSafeName(fileObject));
         }
 
-        Map<FileName, Reference<FileObject>> files = getOrCreateFilesystemCache(file.getFileSystem());
+        Map<FileName, Reference<FileObject>> files = getOrCreateFilesystemCache(fileObject.getFileSystem());
 
-        Reference<FileObject> ref = createReference(file, refQueue);
-        FileSystemAndNameKey key = new FileSystemAndNameKey(file.getFileSystem(), file.getName());
+        Reference<FileObject> ref = createReference(fileObject, refQueue);
+        FileSystemAndNameKey key = new FileSystemAndNameKey(fileObject.getFileSystem(), fileObject.getName());
 
         lock.lock();
         try
         {
-            if (files.containsKey(file.getName()) && files.get(file.getName()).get()
!= null)
+            if (files.containsKey(fileObject.getName()) && files.get(fileObject.getName()).get()
!= null)
             {
                 return false;
             }
-            Reference<FileObject> old = files.put(file.getName(), ref);
+            Reference<FileObject> old = files.put(fileObject.getName(), ref);
             if (old != null)
             {
                 refReverseMap.remove(old);
@@ -235,14 +235,14 @@ public class SoftRefFilesCache extends A
     }
 
     @Override
-    public FileObject getFile(final FileSystem fileSystem, final FileName name)
+    public FileObject getFile(final FileSystem fileSystem, final FileName fileName)
     {
         Map<FileName, Reference<FileObject>> files = getOrCreateFilesystemCache(fileSystem);
 
         lock.lock();
         try
         {
-            Reference<FileObject> ref = files.get(name);
+            Reference<FileObject> ref = files.get(fileName);
             if (ref == null)
             {
                 return null;
@@ -251,7 +251,7 @@ public class SoftRefFilesCache extends A
             FileObject fo = ref.get();
             if (fo == null)
             {
-                removeFile(fileSystem, name);
+                removeFile(fileSystem, fileName);
             }
             return fo;
         }
@@ -334,15 +334,15 @@ public class SoftRefFilesCache extends A
     }
 
     @Override
-    public void removeFile(FileSystem fileSystem, FileName name)
+    public void removeFile(FileSystem fileSystem, FileName fileName)
     {
-        if (removeFile(new FileSystemAndNameKey(fileSystem, name)))
+        if (removeFile(new FileSystemAndNameKey(fileSystem, fileName)))
         {
             close(fileSystem);
         }
     }
 
-    public void touchFile(FileObject file)
+    public void touchFile(FileObject fileObject)
     {
     }
 



Mime
View raw message