You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ad...@apache.org on 2003/02/24 08:29:43 UTC
cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/impl VFSClassLoader.java
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