geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r702408 - /geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java
Date Tue, 07 Oct 2008 09:29:16 GMT
Author: jdillon
Date: Tue Oct  7 02:29:16 2008
New Revision: 702408

URL: http://svn.apache.org/viewvc?rev=702408&view=rev
Log:
Close files

Modified:
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java?rev=702408&r1=702407&r2=702408&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/FileObjectNameCompleter.java
Tue Oct  7 02:29:16 2008
@@ -61,10 +61,6 @@
             assert fileSystemAccess != null;
             FileObject file = fileSystemAccess.resolveFile(path);
 
-            //
-            // TODO: Close files
-            //
-            
             log.trace("Resolved file: {}", file);
 
             final String search;
@@ -102,7 +98,9 @@
                 int result = path.lastIndexOf(FileName.SEPARATOR) + 1;
 
                 log.trace("Result: {}", result);
-                
+
+                FileObjects.close(file);
+
                 return result;
             }
             else {
@@ -164,6 +162,8 @@
 
                     // noinspection unchecked
                     Collections.sort(candidates);
+
+                    FileObjects.closeAll(files);
                 }
             }
 
@@ -178,6 +178,8 @@
 
             log.trace("Result: {}", result);
 
+            FileObjects.close(file);
+
             return result;
         }
         catch (FileSystemException e) {



Mime
View raw message