commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/impl VFSClassLoader.java
Date Mon, 24 Feb 2003 07:29:43 GMT
adammurdoch    2003/02/23 23:29:43

  Modified:    vfs/src/java/org/apache/commons/vfs/impl VFSClassLoader.java
  Log:
  Use new version of createFileSystem() to open zip/jar files.
  
  Revision  Changes    Path
  1.16      +5 -14     jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/impl/VFSClassLoader.java
  
  Index: VFSClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/impl/VFSClassLoader.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- VFSClassLoader.java	12 Feb 2003 07:56:10 -0000	1.15
  +++ VFSClassLoader.java	24 Feb 2003 07:29:43 -0000	1.16
  @@ -182,20 +182,11 @@
                   continue;
               }
   
  -            if ( file.getType() == FileType.FILE )
  +            // TODO - use federation instead
  +            if ( manager.canCreateFileSystem( file ) )
               {
  -                // TODO - use federation instead
  -                final String extension = file.getName().getExtension();
  -                if ( extension.equalsIgnoreCase( "jar" ) )
  -                {
  -                    // Open as Jar file
  -                    file = manager.createFileSystem( "jar", file );
  -                }
  -                else if ( extension.equalsIgnoreCase( "zip" ) )
  -                {
  -                    // Open as a Zip file
  -                    file = manager.createFileSystem( "zip", file );
  -                }
  +                // Use contents of the file
  +                file = manager.createFileSystem( file );
               }
   
               resources.add( file );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message