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/21 14:09:01 UTC

cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/jar JarFileSystem.java

adammurdoch    2003/02/21 05:09:00

  Modified:    vfs/src/java/org/apache/commons/vfs Resources.properties
               vfs/src/java/org/apache/commons/vfs/provider
                        AbstractFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/zip
                        ZipFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/webdav
                        WebDavFileSystem.java WebdavFileObject.java
               vfs/src/java/org/apache/commons/vfs/provider/url
                        UrlFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/smb
                        SmbFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/local
                        LocalFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/jar
                        JarFileSystem.java
  Log:
  AbstractFileSystem.createFile() now throws Exception, rather than FileSystemException.
  
  Revision  Changes    Path
  1.20      +1 -0      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/Resources.properties,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Resources.properties	21 Feb 2003 05:13:59 -0000	1.19
  +++ Resources.properties	21 Feb 2003 13:08:59 -0000	1.20
  @@ -63,6 +63,7 @@
   vfs.provider/notify-listener.warn=Could not notify listener of change to "{0}".
   vfs.provider/replicate-missing-file.error=Could not replicate "{0}" as it does not exist.
   vfs.provider/replicate-file.error=Could not replicate "{0}".
  +vfs.provider/create-file.error=Could not create "{0}".
   
   # UriParser
   vfs.provider/missing-double-slashes.error=Expecting // to follow the scheme in URI "{0}".
  
  
  
  1.19      +9 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileSystem.java
  
  Index: AbstractFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileSystem.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- AbstractFileSystem.java	20 Feb 2003 01:34:33 -0000	1.18
  +++ AbstractFileSystem.java	21 Feb 2003 13:08:59 -0000	1.19
  @@ -121,7 +121,7 @@
        * file is not cached.
        */
       protected abstract FileObject createFile( final FileName name )
  -        throws FileSystemException;
  +        throws Exception;
   
       /**
        * Adds the capabilities of this file system.
  @@ -220,7 +220,14 @@
           FileObject file = (FileObject)files.get( name );
           if ( file == null )
           {
  -            file = createFile( name );
  +            try
  +            {
  +                file = createFile( name );
  +            }
  +            catch ( Exception e )
  +            {
  +                throw new FileSystemException( "vfs.provider/create-file.error", name );
  +            }
               files.put( name, file );
           }
           return file;
  
  
  
  1.21      +5 -6      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java
  
  Index: ZipFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ZipFileSystem.java	12 Feb 2003 07:56:17 -0000	1.20
  +++ ZipFileSystem.java	21 Feb 2003 13:08:59 -0000	1.21
  @@ -141,15 +141,14 @@
           }
       }
   
  -    protected ZipFileObject createZipFileObject( FileName name,
  -                                                 ZipEntry entry,
  -                                                 ZipFile file )
  -        throws FileSystemException
  +    protected ZipFileObject createZipFileObject( final FileName name,
  +                                                 final ZipEntry entry,
  +                                                 final ZipFile file )
       {
           return new ZipFileObject( name, entry, file, this );
       }
   
  -    protected ZipFile createZipFile( File file ) throws FileSystemException
  +    protected ZipFile createZipFile( final File file ) throws FileSystemException
       {
           try
           {
  @@ -194,7 +193,7 @@
       /**
        * Creates a file object.
        */
  -    protected FileObject createFile( FileName name ) throws FileSystemException
  +    protected FileObject createFile( final FileName name )
       {
           // This is only called for files which do not exist in the Zip file
           return new ZipFileObject( name, null, null, this );
  
  
  
  1.4       +1 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/webdav/WebDavFileSystem.java
  
  Index: WebDavFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/webdav/WebDavFileSystem.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WebDavFileSystem.java	20 Feb 2003 07:32:55 -0000	1.3
  +++ WebDavFileSystem.java	21 Feb 2003 13:08:59 -0000	1.4
  @@ -131,7 +131,6 @@
        * file is not cached.
        */
       protected FileObject createFile( final FileName name )
  -        throws FileSystemException
       {
           final GenericFileName fileName = (GenericFileName)name;
           return new WebdavFileObject( fileName, this );
  
  
  
  1.4       +2 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
  
  Index: WebdavFileObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WebdavFileObject.java	17 Feb 2003 09:20:01 -0000	1.3
  +++ WebdavFileObject.java	21 Feb 2003 13:08:59 -0000	1.4
  @@ -85,7 +85,7 @@
       private HttpURL url;
   
       public WebdavFileObject( final GenericFileName name,
  -                             final WebDavFileSystem fileSystem ) throws FileSystemException
  +                             final WebDavFileSystem fileSystem )
       {
           super( name, fileSystem );
           this.fileSystem = fileSystem;
  
  
  
  1.12      +2 -3      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/url/UrlFileSystem.java
  
  Index: UrlFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/url/UrlFileSystem.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- UrlFileSystem.java	12 Feb 2003 07:56:17 -0000	1.11
  +++ UrlFileSystem.java	21 Feb 2003 13:09:00 -0000	1.12
  @@ -60,7 +60,6 @@
   import org.apache.commons.vfs.FileName;
   import org.apache.commons.vfs.FileObject;
   import org.apache.commons.vfs.FileSystem;
  -import org.apache.commons.vfs.FileSystemException;
   import org.apache.commons.vfs.provider.AbstractFileSystem;
   
   /**
  @@ -81,7 +80,7 @@
       /**
        * Creates a file object.
        */
  -    protected FileObject createFile( final FileName name ) throws FileSystemException
  +    protected FileObject createFile( final FileName name )
       {
           return new UrlFileObject( this, name );
       }
  
  
  
  1.14      +1 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/smb/SmbFileSystem.java
  
  Index: SmbFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/smb/SmbFileSystem.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SmbFileSystem.java	12 Feb 2003 07:56:16 -0000	1.13
  +++ SmbFileSystem.java	21 Feb 2003 13:09:00 -0000	1.14
  @@ -60,7 +60,6 @@
   import org.apache.commons.vfs.FileName;
   import org.apache.commons.vfs.FileObject;
   import org.apache.commons.vfs.FileSystem;
  -import org.apache.commons.vfs.FileSystemException;
   import org.apache.commons.vfs.provider.AbstractFileSystem;
   
   /**
  @@ -81,7 +80,7 @@
       /**
        * Creates a file object.
        */
  -    protected FileObject createFile( final FileName name ) throws FileSystemException
  +    protected FileObject createFile( final FileName name )
       {
           return new SmbFileObject( name, this );
       }
  
  
  
  1.15      +0 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/local/LocalFileSystem.java
  
  Index: LocalFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/local/LocalFileSystem.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- LocalFileSystem.java	12 Feb 2003 07:56:15 -0000	1.14
  +++ LocalFileSystem.java	21 Feb 2003 13:09:00 -0000	1.15
  @@ -89,7 +89,6 @@
        * Creates a file object.
        */
       protected FileObject createFile( final FileName name )
  -        throws FileSystemException
       {
           // Create the file
           final String fileName = rootFile + name.getPath();
  
  
  
  1.12      +1 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/jar/JarFileSystem.java
  
  Index: JarFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/jar/JarFileSystem.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JarFileSystem.java	12 Feb 2003 07:56:15 -0000	1.11
  +++ JarFileSystem.java	21 Feb 2003 13:09:00 -0000	1.12
  @@ -103,7 +103,6 @@
       protected ZipFileObject createZipFileObject( FileName name,
                                                    ZipEntry entry,
                                                    ZipFile file )
  -        throws FileSystemException
       {
           return new JarFileObject( name, entry, file, this );
       }
  
  
  

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