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/test/org/apache/commons/vfs/test AbstractFileSystemTestCase.java
Date Mon, 21 Oct 2002 02:52:41 GMT
adammurdoch    2002/10/20 19:52:41

  Modified:    vfs/src/java/org/apache/commons/vfs FileSystem.java
                        FileSystemException.java
                        FileSystemManagerFactory.java
               vfs/src/java/org/apache/commons/vfs/impl VFSClassLoader.java
               vfs/src/java/org/apache/commons/vfs/provider
                        AbstractFileObject.java DefaultFileContent.java
                        UriParser.java
               vfs/src/java/org/apache/commons/vfs/provider/ftp
                        FtpFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/jar
                        JarFileObject.java JarURLConnectionImpl.java
               vfs/src/java/org/apache/commons/vfs/provider/local
                        LocalFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/smb
                        SmbFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/zip
                        ZipFileSystem.java ZipFileSystemProvider.java
               vfs/src/java/org/apache/commons/vfs/util Os.java
               vfs/src/test/org/apache/commons AbstractVfsTestCase.java
               vfs/src/test/org/apache/commons/vfs/provider/ftp/test
                        FtpFileSystemTestCase.java
               vfs/src/test/org/apache/commons/vfs/provider/jar/test
                        JarFileSystemTestCase.java
                        NestedJarFileSystemTestCase.java
               vfs/src/test/org/apache/commons/vfs/provider/local/test
                        LocalFileSystemTestCase.java
               vfs/src/test/org/apache/commons/vfs/provider/smb/test
                        SmbFileSystemTestCase.java
               vfs/src/test/org/apache/commons/vfs/provider/zip/test
                        NestedZipFileSystemTestCase.java
                        ZipFileSystemTestCase.java
               vfs/src/test/org/apache/commons/vfs/test
                        AbstractFileSystemTestCase.java
  Log:
  Fix a bunch of checkstyle violations.
  
  Revision  Changes    Path
  1.2       +1 -5      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/FileSystem.java
  
  Index: FileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/FileSystem.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileSystem.java	22 Aug 2002 02:42:45 -0000	1.1
  +++ FileSystem.java	21 Oct 2002 02:52:40 -0000	1.2
  @@ -7,10 +7,6 @@
    */
   package org.apache.commons.vfs;
   
  -import org.apache.commons.vfs.FileName;
  -import org.apache.commons.vfs.FileObject;
  -import org.apache.commons.vfs.FileSystemException;
  -
   /**
    * A file system.
    *
  
  
  
  1.5       +10 -10    jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/FileSystemException.java
  
  Index: FileSystemException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/FileSystemException.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FileSystemException.java	21 Oct 2002 01:40:37 -0000	1.4
  +++ FileSystemException.java	21 Oct 2002 02:52:40 -0000	1.5
  @@ -33,7 +33,7 @@
        */
       public FileSystemException( final String code )
       {
  -        this( code, null , null);
  +        this( code, null, null );
       }
   
       /**
  @@ -44,7 +44,7 @@
        */
       public FileSystemException( final String code, final Object info0 )
       {
  -        this( code, new Object[]{info0} , null);
  +        this( code, new Object[]{info0}, null );
       }
   
       /**
  @@ -56,7 +56,7 @@
        */
       public FileSystemException( final String code,
                                   final Object info0,
  -                                final Throwable throwable)
  +                                final Throwable throwable )
       {
           this( code, new Object[]{info0}, throwable );
       }
  @@ -69,7 +69,7 @@
        */
       public FileSystemException( final String code, final Object[] info )
       {
  -        this( code, info , null);
  +        this( code, info, null );
       }
   
       /**
  @@ -84,16 +84,16 @@
                                   final Throwable throwable )
       {
           super( code );
  -        if (info == null)
  +        if ( info == null )
           {
  -            this.info = new String[0];
  +            this.info = new String[ 0 ];
           }
           else
           {
  -            this.info = new String[info.length];
  -            for (int i = 0; i<info.length; i++)
  +            this.info = new String[ info.length ];
  +            for ( int i = 0; i < info.length; i++ )
               {
  -                this.info[i] = String.valueOf(info[i]);
  +                this.info[ i ] = String.valueOf( info[ i ] );
               }
           }
           this.throwable = throwable;
  @@ -106,7 +106,7 @@
        */
       public FileSystemException( final Throwable throwable )
       {
  -        this(throwable.getMessage(),  null, throwable);
  +        this( throwable.getMessage(), null, throwable );
       }
   
       /**
  
  
  
  1.7       +2 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/FileSystemManagerFactory.java
  
  Index: FileSystemManagerFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/FileSystemManagerFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FileSystemManagerFactory.java	21 Oct 2002 01:40:37 -0000	1.6
  +++ FileSystemManagerFactory.java	21 Oct 2002 02:52:40 -0000	1.7
  @@ -32,7 +32,7 @@
       /**
        * Returns the default {@link FileSystemManager} instance.
        */
  -    public synchronized static FileSystemManager getManager()
  +    public static synchronized FileSystemManager getManager()
           throws FileSystemException
       {
           if ( instance == null )
  
  
  
  1.4       +16 -15    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- VFSClassLoader.java	21 Oct 2002 01:40:38 -0000	1.3
  +++ VFSClassLoader.java	21 Oct 2002 02:52:40 -0000	1.4
  @@ -58,7 +58,7 @@
           resources = new ArrayList( files.length );
           for ( int i = 0; i < files.length; i++ )
           {
  -            addFileObject( files[i] );
  +            addFileObject( files[ i ] );
           }
       }
   
  @@ -84,7 +84,7 @@
           resources = new ArrayList( files.length );
           for ( int i = 0; i < files.length; i++ )
           {
  -            addFileObject( files[i] );
  +            addFileObject( files[ i ] );
           }
       }
   
  @@ -112,7 +112,7 @@
               Resource res = loadResource( path );
               if ( res == null )
               {
  -                throw new ClassNotFoundException(name);
  +                throw new ClassNotFoundException( name );
               }
               return defineClass( name, res );
           }
  @@ -178,22 +178,22 @@
           URL sealBase = null;
           final FileContent content =
               res.getFileObject().getParent().getContent();
  -        String specTitle = (String) content.getAttribute(
  +        String specTitle = (String)content.getAttribute(
               Name.SPECIFICATION_TITLE.toString() );
   
  -        String specVersion = (String) content.getAttribute(
  +        String specVersion = (String)content.getAttribute(
               Name.SPECIFICATION_VERSION.toString() );
  -        String specVendor = (String) content.getAttribute(
  +        String specVendor = (String)content.getAttribute(
               Name.SPECIFICATION_VENDOR.toString() );
  -        String implTitle = (String) content.getAttribute(
  +        String implTitle = (String)content.getAttribute(
               Name.IMPLEMENTATION_TITLE.toString() );
  -        String implVersion = (String) content.getAttribute(
  +        String implVersion = (String)content.getAttribute(
               Name.IMPLEMENTATION_VERSION.toString() );
  -        String implVendor = (String) content.getAttribute(
  +        String implVendor = (String)content.getAttribute(
               Name.IMPLEMENTATION_VENDOR.toString() );
  -        String seal = (String) content.getAttribute( Name.SEALED.toString() );
  +        String seal = (String)content.getAttribute( Name.SEALED.toString() );
   
  -        if( "true".equalsIgnoreCase( seal ) )
  +        if ( "true".equalsIgnoreCase( seal ) )
           {
               sealBase = url;
           }
  @@ -209,7 +209,7 @@
       {
           final FileContent content =
               res.getFileObject().getParent().getContent();
  -        String sealed = (String) content.getAttribute( Name.SEALED.toString() );
  +        String sealed = (String)content.getAttribute( Name.SEALED.toString() );
   
           return "true".equalsIgnoreCase( sealed );
       }
  @@ -270,7 +270,7 @@
       {
           for ( Enumeration elem = src.elements(); elem.hasMoreElements(); )
           {
  -            final Permission permission = (Permission) elem.nextElement();
  +            final Permission permission = (Permission)elem.nextElement();
               dest.add( permission );
           }
       }
  @@ -284,7 +284,7 @@
           Iterator it = resources.iterator();
           while ( it.hasNext() )
           {
  -            final FileObject object = (FileObject) it.next();
  +            final FileObject object = (FileObject)it.next();
               if ( name.equals( object.getName().getURI() ) )
               {
                   return object;
  @@ -348,6 +348,7 @@
               }
               catch ( FileSystemException fse )
               {
  +                // TODO - report this?
               }
           }
           return null;
  
  
  
  1.10      +11 -9     jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
  
  Index: AbstractFileObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractFileObject.java	21 Oct 2002 01:40:38 -0000	1.9
  +++ AbstractFileObject.java	21 Oct 2002 02:52:40 -0000	1.10
  @@ -382,7 +382,7 @@
       {
           if ( this == fs.getRoot() )
           {
  -            if (fs.getParentLayer() != null)
  +            if ( fs.getParentLayer() != null )
               {
                   return fs.getParentLayer().getParent();
               }
  @@ -678,9 +678,9 @@
               // Create the output stream via getContent(), to pick up the
               // validation it does
               outstr = destFile.getContent().getOutputStream();
  -            final byte[] buffer = new byte[ 1024*4 ];
  +            final byte[] buffer = new byte[ 1024 * 4 ];
               int n = 0;
  -            while( -1 != ( n = instr.read( buffer ) ) )
  +            while ( -1 != ( n = instr.read( buffer ) ) )
               {
                   outstr.write( buffer, 0, n );
               }
  @@ -695,22 +695,24 @@
           }
           finally
           {
  -            if (instr != null)
  +            if ( instr != null )
               {
  -                try {
  +                try
  +                {
                       instr.close();
                   }
  -                catch( final Exception exc )
  +                catch ( final Exception exc )
                   {
                       //ignore
                   }
               }
  -            if (outstr != null)
  +            if ( outstr != null )
               {
  -                try {
  +                try
  +                {
                       outstr.close();
                   }
  -                catch( final Exception exc )
  +                catch ( final Exception exc )
                   {
                       //ignore
                   }
  
  
  
  1.5       +7 -7      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java
  
  Index: DefaultFileContent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultFileContent.java	21 Oct 2002 01:40:38 -0000	1.4
  +++ DefaultFileContent.java	21 Oct 2002 02:52:40 -0000	1.5
  @@ -53,7 +53,7 @@
        */
       public long getSize() throws FileSystemException
       {
  -        if( file.isFolder() )
  +        if ( file.isFolder() )
           {
               throw new FileSystemException( "vfs.provider/get-size-folder.error", file );
           }
  @@ -84,7 +84,7 @@
        */
       public long getLastModifiedTime() throws FileSystemException
       {
  -        if( !file.exists() )
  +        if ( !file.exists() )
           {
               throw new FileSystemException( "vfs.provider/get-last-modified-no-exist.error", file );
           }
  @@ -96,7 +96,7 @@
        */
       public void setLastModifiedTime( long modTime ) throws FileSystemException
       {
  -        if( !file.exists() )
  +        if ( !file.exists() )
           {
               throw new FileSystemException( "vfs.provider/set-last-modified-no-exist.error", file );
           }
  @@ -124,7 +124,7 @@
        */
       public Certificate[] getCertificates() throws FileSystemException
       {
  -        if( !file.exists() )
  +        if ( !file.exists() )
           {
               throw new FileSystemException( "vfs.provider/get-certificates-no-exist.error", file );
           }
  @@ -136,7 +136,7 @@
        */
       public InputStream getInputStream() throws FileSystemException
       {
  -        if( file.isFolder() )
  +        if ( file.isFolder() )
           {
               throw new FileSystemException( "vfs.provider/read-folder.error", file );
           }
  @@ -171,7 +171,7 @@
        */
       public OutputStream getOutputStream() throws FileSystemException
       {
  -        if( file.isFolder() )
  +        if ( file.isFolder() )
           {
               throw new FileSystemException( "vfs.provider/write-folder.error", file );
           }
  @@ -257,7 +257,7 @@
        */
       private final class FileContentInputStream extends BufferedInputStream
       {
  -        boolean _finished;
  +        private boolean _finished;
   
           FileContentInputStream( InputStream instr )
           {
  
  
  
  1.5       +5 -5      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/UriParser.java
  
  Index: UriParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/UriParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- UriParser.java	21 Oct 2002 01:40:38 -0000	1.4
  +++ UriParser.java	21 Oct 2002 02:52:40 -0000	1.5
  @@ -600,9 +600,9 @@
                   maxlen = path.length();
                   continue;
               }
  -            if ( elemLen == 2 &&
  -                path.charAt( startElem ) == '.' &&
  -                path.charAt( startElem + 1 ) == '.' )
  +            if ( elemLen == 2
  +                 && path.charAt( startElem ) == '.'
  +                 && path.charAt( startElem + 1 ) == '.' )
               {
                   // A '..' element - remove the previous element
                   if ( startElem == startFirstElem )
  @@ -721,8 +721,8 @@
                   // A scheme character
                   continue;
               }
  -            if ( pos > 0 &&
  -                ( ( ch >= '0' && ch <= '9' )
  +            if ( pos > 0
  +                && ( ( ch >= '0' && ch <= '9' )
                   || ch == '+' || ch == '-' || ch == '.' ) )
               {
                   // A scheme character (these are not allowed as the first
  
  
  
  1.8       +0 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
  
  Index: FtpFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FtpFileSystem.java	21 Oct 2002 01:40:38 -0000	1.7
  +++ FtpFileSystem.java	21 Oct 2002 02:52:40 -0000	1.8
  @@ -15,7 +15,6 @@
   import org.apache.commons.vfs.FileObject;
   import org.apache.commons.vfs.FileSystemException;
   import org.apache.commons.vfs.provider.AbstractFileSystem;
  -import org.apache.commons.vfs.provider.FileSystemProviderContext;
   
   /**
    * An FTP file system.
  
  
  
  1.2       +12 -12    jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/jar/JarFileObject.java
  
  Index: JarFileObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/jar/JarFileObject.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JarFileObject.java	22 Aug 2002 01:32:49 -0000	1.1
  +++ JarFileObject.java	21 Oct 2002 02:52:40 -0000	1.2
  @@ -40,24 +40,24 @@
   
       Manifest getManifest() throws IOException
       {
  -        if( file == null )
  +        if ( file == null )
               return null;
  -            
  -        return ((JarFile) file).getManifest();
  +
  +        return ( (JarFile)file ).getManifest();
       }
   
       Attributes getAttributes() throws IOException
       {
  -        if( attributes == null )
  +        if ( attributes == null )
           {
  -            if( entry == null )
  +            if ( entry == null )
               {
                   attributes = new Attributes( 1 );
               }
               else
               {
  -                attributes = ( (JarEntry) entry).getAttributes();
  -                if( attributes == null )
  +                attributes = ( (JarEntry)entry ).getAttributes();
  +                if ( attributes == null )
                   {
                       attributes = new Attributes( 1 );
                   }
  @@ -75,7 +75,7 @@
       {
           try
           {
  -            final JarFileSystem fs = (JarFileSystem) getFileSystem();
  +            final JarFileSystem fs = (JarFileSystem)getFileSystem();
               final Attributes attr = getAttributes();
               final Name name = fs.lookupName( attrName );
               String value = attr.getValue( name );
  @@ -91,15 +91,15 @@
               throw new FileSystemException( attrName, ioe );
           }
       }
  -    
  +
       /**
        * Return the certificates of this JarEntry.
        */
       protected Certificate[] doGetCertificates()
       {
  -        if( entry == null )
  +        if ( entry == null )
               return null;
   
  -        return ((JarEntry) entry).getCertificates();
  +        return ( (JarEntry)entry ).getCertificates();
       }
   }
  
  
  
  1.4       +15 -10    jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/jar/JarURLConnectionImpl.java
  
  Index: JarURLConnectionImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/jar/JarURLConnectionImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JarURLConnectionImpl.java	21 Oct 2002 01:40:38 -0000	1.3
  +++ JarURLConnectionImpl.java	21 Oct 2002 02:52:40 -0000	1.4
  @@ -34,10 +34,10 @@
       // This is because JarURLConnection SUCKS
       private static final String HACK_URL = "jar:http://somehost/somejar.jar!/";
   
  -    FileContent             content;
  -    protected URL           parentURL;
  -    protected JarFileObject file;
  -    protected String        entryName;
  +    private FileContent content;
  +    private URL parentURL;
  +    private JarFileObject file;
  +    private String entryName;
   
       public JarURLConnectionImpl( JarFileObject file, FileContent content )
           throws MalformedURLException, FileSystemException
  @@ -103,7 +103,8 @@
       public InputStream getInputStream()
           throws IOException
       {
  -        try{
  +        try
  +        {
               return content.getInputStream();
           }
           catch ( FileSystemException fse )
  @@ -115,7 +116,8 @@
       public OutputStream getOutputStream()
           throws IOException
       {
  -        try{
  +        try
  +        {
               return content.getOutputStream();
           }
           catch ( FileSystemException fse )
  @@ -126,10 +128,13 @@
   
       public int getContentLength()
       {
  -        try{
  -            return (int) content.getSize();
  +        try
  +        {
  +            return (int)content.getSize();
  +        }
  +        catch ( FileSystemException fse )
  +        {
           }
  -        catch ( FileSystemException fse ) {}
   
           return -1;
       }
  
  
  
  1.6       +1 -3      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LocalFileSystem.java	22 Aug 2002 02:42:46 -0000	1.5
  +++ LocalFileSystem.java	21 Oct 2002 02:52:40 -0000	1.6
  @@ -9,11 +9,9 @@
   
   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;
  -import org.apache.commons.vfs.provider.DefaultFileName;
  -import org.apache.commons.vfs.FileSystem;
  -import org.apache.commons.vfs.provider.FileSystemProviderContext;
   
   /**
    * A local file system.
  
  
  
  1.6       +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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SmbFileSystem.java	22 Aug 2002 02:42:46 -0000	1.5
  +++ SmbFileSystem.java	21 Oct 2002 02:52:40 -0000	1.6
  @@ -9,10 +9,9 @@
   
   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;
  -import org.apache.commons.vfs.FileSystem;
  -import org.apache.commons.vfs.provider.FileSystemProviderContext;
   
   /**
    * A SMB file system.
  
  
  
  1.11      +4 -5      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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ZipFileSystem.java	21 Oct 2002 01:40:38 -0000	1.10
  +++ ZipFileSystem.java	21 Oct 2002 02:52:40 -0000	1.11
  @@ -63,10 +63,9 @@
   
               // Create the file
               ZipFileObject fileObj;
  -            if ( entry.isDirectory() &&
  -                 getFile( name ) != null )
  +            if ( entry.isDirectory() && getFile( name ) != null )
               {
  -                fileObj = (ZipFileObject) getFile( name );
  +                fileObj = (ZipFileObject)getFile( name );
                   fileObj.setZipEntry( entry );
                   continue;
               }
  @@ -82,7 +81,7 @@
                     fileObj = parent, parentName = parentName.getParent() )
               {
                   // Locate the parent
  -                parent = (ZipFileObject) getFile( parentName );
  +                parent = (ZipFileObject)getFile( parentName );
                   if ( parent == null )
                   {
                       parent = createZipFileObject( parentName, null, zipFile );
  @@ -127,7 +126,7 @@
           }
           catch ( final IOException e )
           {
  -            getLogger().warn( "vfs.provider.zip/close-zip-file.error :"+ file, e );
  +            getLogger().warn( "vfs.provider.zip/close-zip-file.error :" + file, e );
           }
   
           super.close();
  
  
  
  1.9       +0 -4      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystemProvider.java
  
  Index: ZipFileSystemProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystemProvider.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ZipFileSystemProvider.java	22 Aug 2002 08:00:39 -0000	1.8
  +++ ZipFileSystemProvider.java	21 Oct 2002 02:52:40 -0000	1.9
  @@ -7,16 +7,12 @@
    */
   package org.apache.commons.vfs.provider.zip;
   
  -import java.security.AccessController;
  -import java.security.PrivilegedActionException;
  -import java.security.PrivilegedExceptionAction;
   import org.apache.commons.vfs.FileObject;
   import org.apache.commons.vfs.FileSystem;
   import org.apache.commons.vfs.FileSystemException;
   import org.apache.commons.vfs.provider.AbstractLayeredFileProvider;
   import org.apache.commons.vfs.provider.DefaultFileName;
   import org.apache.commons.vfs.provider.FileProvider;
  -import org.apache.commons.vfs.provider.ParsedUri;
   import org.apache.commons.vfs.provider.ParsedLayeredUri;
   
   /**
  
  
  
  1.3       +3 -3      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/util/Os.java
  
  Index: Os.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/util/Os.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Os.java	21 Aug 2002 07:00:13 -0000	1.2
  +++ Os.java	21 Oct 2002 02:52:40 -0000	1.3
  @@ -281,9 +281,9 @@
           // Determine the most specific OS family
           if ( OS_NAME.indexOf( "windows" ) > -1 )
           {
  -            if ( OS_NAME.indexOf( "xp" ) > -1 ||
  -                OS_NAME.indexOf( "2000" ) > -1 ||
  -                OS_NAME.indexOf( "nt" ) > -1 )
  +            if ( OS_NAME.indexOf( "xp" ) > -1
  +                 || OS_NAME.indexOf( "2000" ) > -1
  +                 || OS_NAME.indexOf( "nt" ) > -1 )
               {
                   return OS_FAMILY_WINNT;
               }
  
  
  
  1.6       +5 -5      jakarta-commons-sandbox/vfs/src/test/org/apache/commons/AbstractVfsTestCase.java
  
  Index: AbstractVfsTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/AbstractVfsTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractVfsTestCase.java	21 Oct 2002 01:40:39 -0000	1.5
  +++ AbstractVfsTestCase.java	21 Oct 2002 02:52:40 -0000	1.6
  @@ -22,13 +22,13 @@
   public abstract class AbstractVfsTestCase
       extends TestCase
   {
  -    private final File m_baseDir;
  +    private final File baseDir;
   
       public AbstractVfsTestCase( final String name )
       {
           super( name );
           final String baseDirProp = System.getProperty( "test.basedir" );
  -        m_baseDir = getCanonicalFile( new File( baseDirProp ) );
  +        baseDir = getCanonicalFile( new File( baseDirProp ) );
       }
   
       /**
  @@ -73,7 +73,7 @@
        */
       protected File getTestResource( final String name, final boolean mustExist )
       {
  -        File file = new File( m_baseDir, name );
  +        File file = new File( baseDir, name );
           file = getCanonicalFile( file );
           if( mustExist )
           {
  @@ -92,7 +92,7 @@
        */
       protected File getTestDirectory()
       {
  -        return m_baseDir;
  +        return baseDir;
       }
   
       /**
  @@ -102,7 +102,7 @@
        */
       protected File getTestDirectory( final String name )
       {
  -        File file = new File( m_baseDir, name );
  +        File file = new File( baseDir, name );
           file = getCanonicalFile( file );
           assertTrue( "Test directory \"" + file + "\" does not exist or is not a directory.",
                       file.isDirectory() || file.mkdirs() );
  
  
  
  1.2       +3 -3      jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/ftp/test/FtpFileSystemTestCase.java
  
  Index: FtpFileSystemTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/ftp/test/FtpFileSystemTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FtpFileSystemTestCase.java	16 Jul 2002 17:19:10 -0000	1.1
  +++ FtpFileSystemTestCase.java	21 Oct 2002 02:52:40 -0000	1.2
  @@ -30,8 +30,8 @@
       protected FileObject getBaseFolder() throws Exception
       {
           final String uri = System.getProperty( "test.ftp.uri" ) + "/read-tests";
  -        m_manager.addProvider( "ftp", new FtpFileSystemProvider() );
  -        return m_manager.resolveFile( uri );
  +        getManager().addProvider( "ftp", new FtpFileSystemProvider() );
  +        return getManager().resolveFile( uri );
       }
   
       /**
  @@ -40,6 +40,6 @@
       protected FileObject getWriteFolder() throws Exception
       {
           final String uri = System.getProperty( "test.ftp.uri" ) + "/write-tests";
  -        return m_manager.resolveFile( uri );
  +        return getManager().resolveFile( uri );
       }
   }
  
  
  
  1.2       +2 -2      jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/jar/test/JarFileSystemTestCase.java
  
  Index: JarFileSystemTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/jar/test/JarFileSystemTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JarFileSystemTestCase.java	22 Aug 2002 01:32:49 -0000	1.1
  +++ JarFileSystemTestCase.java	21 Oct 2002 02:52:40 -0000	1.2
  @@ -32,8 +32,8 @@
       {
           File jarFile = getTestResource( "test.jar" );
           String uri = "jar:" + jarFile.getAbsolutePath() + "!basedir";
  -        m_manager.addProvider( "jar", new JarFileSystemProvider() );
  -        return m_manager.resolveFile( uri );
  +        getManager().addProvider( "jar", new JarFileSystemProvider() );
  +        return getManager().resolveFile( uri );
       }
   
       /**
  
  
  
  1.2       +5 -5      jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/jar/test/NestedJarFileSystemTestCase.java
  
  Index: NestedJarFileSystemTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/jar/test/NestedJarFileSystemTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NestedJarFileSystemTestCase.java	22 Aug 2002 01:32:49 -0000	1.1
  +++ NestedJarFileSystemTestCase.java	21 Oct 2002 02:52:40 -0000	1.2
  @@ -32,11 +32,11 @@
   
       protected FileObject getTopFolder() throws Exception
       {
  -        m_manager.addProvider( "jar", new JarFileSystemProvider() );
  +        getManager().addProvider( "jar", new JarFileSystemProvider() );
   
           File jarFile = getTestResource( "nested.jar" );
           String uri = "jar:" + jarFile.getAbsolutePath() + "!/";
  -        return m_manager.resolveFile( uri );
  +        return getManager().resolveFile( uri );
       }
   
       /**
  @@ -48,7 +48,7 @@
           final FileObject jarFile = topFolder.resolveFile( "test.jar" );
           // Now build the nested file system
           final FileObject nestedFS =
  -            m_manager.createFileSystem( "jar", jarFile );
  +            getManager().createFileSystem( "jar", jarFile );
           return nestedFS.resolveFile( "/basedir" );
       }
   
  @@ -74,7 +74,7 @@
           FileObject test = topFolder.resolveFile( "normal.jar" );
           final FileObject[] objects = { test };
           VFSClassLoader loader =
  -            new VFSClassLoader( objects, m_manager );
  +            new VFSClassLoader( objects, getManager() );
   
           Class testClass = loader.loadClass( "code.ClassToLoad" );
           assertTrue( verifyNormalPackage( testClass.getPackage() ) );
  @@ -85,7 +85,7 @@
           URL resource = loader.getResource( "file1.txt" );
           assertNotNull( resource );
           URLConnection urlCon = resource.openConnection();
  -        assertSameURLContent( m_charContent, urlCon );
  +        assertSameURLContent( getCharContent(), urlCon );
       }
   
       /**
  
  
  
  1.3       +4 -4      jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/local/test/LocalFileSystemTestCase.java
  
  Index: LocalFileSystemTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/local/test/LocalFileSystemTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalFileSystemTestCase.java	20 Aug 2002 02:57:02 -0000	1.2
  +++ LocalFileSystemTestCase.java	21 Oct 2002 02:52:41 -0000	1.3
  @@ -32,7 +32,7 @@
           final File testDir = getTestResource( "basedir" );
           final File emptyDir = new File( testDir, "emptydir" );
           emptyDir.mkdirs();
  -        return m_manager.convert( testDir );
  +        return getManager().convert( testDir );
       }
   
       /**
  @@ -41,7 +41,7 @@
       protected FileObject getWriteFolder() throws Exception
       {
           final File testDir = getTestDirectory( "write-tests" );
  -        return m_manager.convert( testDir );
  +        return getManager().convert( testDir );
       }
   
       /**
  @@ -51,11 +51,11 @@
       {
           // Locate file by absolute file name
           String fileName = new File( "testdir" ).getAbsolutePath();
  -        FileObject absFile = m_manager.resolveFile( fileName );
  +        FileObject absFile = getManager().resolveFile( fileName );
   
           // Locate file by URI
           String uri = "file://" + fileName.replace( File.separatorChar, '/' );
  -        FileObject uriFile = m_manager.resolveFile( uri );
  +        FileObject uriFile = getManager().resolveFile( uri );
   
           assertSame( "file object", absFile, uriFile );
       }
  
  
  
  1.2       +3 -3      jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/smb/test/SmbFileSystemTestCase.java
  
  Index: SmbFileSystemTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/smb/test/SmbFileSystemTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SmbFileSystemTestCase.java	16 Jul 2002 17:19:16 -0000	1.1
  +++ SmbFileSystemTestCase.java	21 Oct 2002 02:52:41 -0000	1.2
  @@ -29,8 +29,8 @@
       protected FileObject getBaseFolder() throws Exception
       {
           final String uri = System.getProperty( "test.smb.uri" ) + "/read-tests";
  -        m_manager.addProvider( "smb", new SmbFileSystemProvider() );
  -        return m_manager.resolveFile( uri );
  +        getManager().addProvider( "smb", new SmbFileSystemProvider() );
  +        return getManager().resolveFile( uri );
       }
   
       /**
  @@ -39,6 +39,6 @@
       protected FileObject getWriteFolder() throws Exception
       {
           final String uri = System.getProperty( "test.smb.uri" ) + "/write-tests";
  -        return m_manager.resolveFile( uri );
  +        return getManager().resolveFile( uri );
       }
   }
  
  
  
  1.2       +3 -3      jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/zip/test/NestedZipFileSystemTestCase.java
  
  Index: NestedZipFileSystemTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/zip/test/NestedZipFileSystemTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NestedZipFileSystemTestCase.java	16 Jul 2002 17:18:57 -0000	1.1
  +++ NestedZipFileSystemTestCase.java	21 Oct 2002 02:52:41 -0000	1.2
  @@ -29,15 +29,15 @@
        */
       protected FileObject getBaseFolder() throws Exception
       {
  -        m_manager.addProvider( "zip", new ZipFileSystemProvider() );
  +        getManager().addProvider( "zip", new ZipFileSystemProvider() );
   
           // Locate the base Zip file
           final String zipFilePath = getTestResource( "nested.zip" ).getAbsolutePath();
           String uri = "zip:" + zipFilePath + "!/test.zip";
  -        final FileObject zipFile = m_manager.resolveFile( uri );
  +        final FileObject zipFile = getManager().resolveFile( uri );
   
           // Now build the nested file system
  -        final FileObject nestedFS = m_manager.createFileSystem( "zip", zipFile );
  +        final FileObject nestedFS = getManager().createFileSystem( "zip", zipFile );
           return nestedFS.resolveFile( "/basedir" );
       }
   }
  
  
  
  1.2       +2 -2      jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/zip/test/ZipFileSystemTestCase.java
  
  Index: ZipFileSystemTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/zip/test/ZipFileSystemTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ZipFileSystemTestCase.java	16 Jul 2002 17:18:57 -0000	1.1
  +++ ZipFileSystemTestCase.java	21 Oct 2002 02:52:41 -0000	1.2
  @@ -31,7 +31,7 @@
       {
           File zipFile = getTestResource( "test.zip" );
           String uri = "zip:" + zipFile.getAbsolutePath() + "!basedir";
  -        m_manager.addProvider( "zip", new ZipFileSystemProvider() );
  -        return m_manager.resolveFile( uri );
  +        getManager().addProvider( "zip", new ZipFileSystemProvider() );
  +        return getManager().resolveFile( uri );
       }
   }
  
  
  
  1.12      +87 -71    jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/AbstractFileSystemTestCase.java
  
  Index: AbstractFileSystemTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/AbstractFileSystemTestCase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractFileSystemTestCase.java	21 Oct 2002 01:40:39 -0000	1.11
  +++ AbstractFileSystemTestCase.java	21 Oct 2002 02:52:41 -0000	1.12
  @@ -44,11 +44,11 @@
   public abstract class AbstractFileSystemTestCase
       extends AbstractVfsTestCase
   {
  -    protected FileObject m_baseFolder;
  -    protected DefaultFileSystemManager m_manager;
  +    private FileObject baseFolder;
  +    private DefaultFileSystemManager manager;
   
       // Contents of "file1.txt"
  -    protected String m_charContent;
  +    private String charContent;
   
       public AbstractFileSystemTestCase( String name )
       {
  @@ -56,6 +56,22 @@
       }
   
       /**
  +     * Returns the expected contents of "file1.txt".
  +     */
  +    protected String getCharContent()
  +    {
  +        return charContent;
  +    }
  +
  +    /**
  +     * Returns the file system manager used by this test.
  +     */
  +    protected DefaultFileSystemManager getManager()
  +    {
  +        return manager;
  +    }
  +
  +    /**
        * Returns the name of the package containing a class.
        *
        * @return The . delimited package name, or an empty string if the class
  @@ -114,19 +130,19 @@
       protected void setUp() throws Exception
       {
           // Create the file system manager
  -        m_manager = new DefaultFileSystemManager();
  -        m_manager.addProvider( "file", new DefaultLocalFileSystemProvider() );
  -        m_manager.setReplicator( new PrivilegedFileReplicator( new DefaultFileReplicator() ) );
  +        manager = new DefaultFileSystemManager();
  +        manager.addProvider( "file", new DefaultLocalFileSystemProvider() );
  +        manager.setReplicator( new PrivilegedFileReplicator( new DefaultFileReplicator() ) );
   
           // Locate the base folder
  -        m_baseFolder = getBaseFolder();
  +        baseFolder = getBaseFolder();
   
           // Make some assumptions absout the name
  -        assertTrue( !m_baseFolder.getName().getPath().equals( "/" ) );
  +        assertTrue( !baseFolder.getName().getPath().equals( "/" ) );
   
           // Build the expected content of "file1.txt"
           final String eol = "\n";
  -        m_charContent = "This is a test file." + eol + "With 2 lines in it." + eol;
  +        charContent = "This is a test file." + eol + "With 2 lines in it." + eol;
       }
   
       /**
  @@ -134,7 +150,7 @@
        */
       protected void tearDown() throws Exception
       {
  -        m_manager.close();
  +        manager.close();
       }
   
       /**
  @@ -143,10 +159,10 @@
       public void testAbsoluteURI() throws Exception
       {
           // Try fetching base folder again by its URI
  -        final String uri = m_baseFolder.getName().getURI();
  -        final FileObject file = m_manager.resolveFile( uri );
  +        final String uri = baseFolder.getName().getURI();
  +        final FileObject file = manager.resolveFile( uri );
   
  -        assertSame( "file object", m_baseFolder, file );
  +        assertSame( "file object", baseFolder, file );
       }
   
       /**
  @@ -155,23 +171,23 @@
       public void testRelativeURI() throws Exception
       {
           // Build base dir
  -        m_manager.setBaseFile( m_baseFolder );
  +        manager.setBaseFile( baseFolder );
   
           // Locate the base dir
  -        FileObject file = m_manager.resolveFile( "." );
  -        assertSame( "file object", m_baseFolder, file );
  +        FileObject file = manager.resolveFile( "." );
  +        assertSame( "file object", baseFolder, file );
   
           // Locate a child
  -        file = m_manager.resolveFile( "some-child" );
  -        assertSame( "file object", m_baseFolder, file.getParent() );
  +        file = manager.resolveFile( "some-child" );
  +        assertSame( "file object", baseFolder, file.getParent() );
   
           // Locate a descendent
  -        file = m_manager.resolveFile( "some-folder/some-file" );
  -        assertSame( "file object", m_baseFolder, file.getParent().getParent() );
  +        file = manager.resolveFile( "some-folder/some-file" );
  +        assertSame( "file object", baseFolder, file.getParent().getParent() );
   
           // Locate parent
  -        file = m_manager.resolveFile( ".." );
  -        assertSame( "file object", m_baseFolder.getParent(), file );
  +        file = manager.resolveFile( ".." );
  +        assertSame( "file object", baseFolder.getParent(), file );
       }
   
       /**
  @@ -180,33 +196,33 @@
       public void testRelativeUriEncoding() throws Exception
       {
           // Build base dir
  -        m_manager.setBaseFile( m_baseFolder );
  -        final String path = m_baseFolder.getName().getPath();
  +        manager.setBaseFile( baseFolder );
  +        final String path = baseFolder.getName().getPath();
   
           // Encode "some file"
  -        FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" );
  +        FileObject file = manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" );
           assertEquals( path + "/some file", file.getName().getPath() );
   
           // Encode "."
  -        file = m_manager.resolveFile( "%2e" );
  +        file = manager.resolveFile( "%2e" );
           assertEquals( path, file.getName().getPath() );
   
           // Encode '%'
  -        file = m_manager.resolveFile( "a%25" );
  +        file = manager.resolveFile( "a%25" );
           assertEquals( path + "/a%", file.getName().getPath() );
   
           // Encode /
  -        file = m_manager.resolveFile( "dir%2fchild" );
  +        file = manager.resolveFile( "dir%2fchild" );
           assertEquals( path + "/dir/child", file.getName().getPath() );
   
           // Encode \
  -        file = m_manager.resolveFile( "dir%5cchild" );
  +        file = manager.resolveFile( "dir%5cchild" );
           assertEquals( path + "/dir/child", file.getName().getPath() );
   
           // Use "%" literal
           try
           {
  -            m_manager.resolveFile( "%" );
  +            manager.resolveFile( "%" );
               fail();
           }
           catch( FileSystemException e )
  @@ -216,7 +232,7 @@
           // Not enough digits in encoded char
           try
           {
  -            m_manager.resolveFile( "%5" );
  +            manager.resolveFile( "%5" );
               fail();
           }
           catch( FileSystemException e )
  @@ -226,7 +242,7 @@
           // Invalid digit in encoded char
           try
           {
  -            m_manager.resolveFile( "%q" );
  +            manager.resolveFile( "%q" );
               fail();
           }
           catch( FileSystemException e )
  @@ -240,7 +256,7 @@
       public void testRootFileName() throws Exception
       {
           // Locate the root file
  -        final FileName rootName = m_baseFolder.getFileSystem().getRoot().getName();
  +        final FileName rootName = baseFolder.getFileSystem().getRoot().getName();
   
           // Test that the root path is "/"
           assertEquals( "root path", "/", rootName.getPath() );
  @@ -257,7 +273,7 @@
        */
       public void testChildName() throws Exception
       {
  -        final FileName baseName = m_baseFolder.getName();
  +        final FileName baseName = baseFolder.getName();
           final String basePath = baseName.getPath();
           final FileName name = baseName.resolveName( "some-child", NameScope.CHILD );
   
  @@ -359,7 +375,7 @@
        */
       public void testNameResolution() throws Exception
       {
  -        final FileName baseName = m_baseFolder.getName();
  +        final FileName baseName = baseFolder.getName();
           final String parentPath = baseName.getParent().getPath();
           final String path = baseName.getPath();
           final String childPath = path + "/some-child";
  @@ -421,7 +437,7 @@
       public void testDescendentName()
           throws Exception
       {
  -        final FileName baseName = m_baseFolder.getName();
  +        final FileName baseName = baseFolder.getName();
   
           // Test direct child
           String path = baseName.getPath() + "/some-child";
  @@ -446,11 +462,11 @@
       public void testAbsoluteNames() throws Exception
       {
           // Test against the base folder
  -        FileName name = m_baseFolder.getName();
  +        FileName name = baseFolder.getName();
           checkAbsoluteNames( name );
   
           // Test against the root
  -        name = m_baseFolder.getFileSystem().getRoot().getName();
  +        name = baseFolder.getFileSystem().getRoot().getName();
           checkAbsoluteNames( name );
   
           // Test against some unknown file
  @@ -504,7 +520,7 @@
        */
       public void testAbsoluteNameConvert() throws Exception
       {
  -        final FileName baseName = m_baseFolder.getName();
  +        final FileName baseName = baseFolder.getName();
   
           String path = "/test1/test2";
           FileName name = baseName.resolveName( path );
  @@ -570,7 +586,7 @@
       public void testStructure() throws Exception
       {
           final FileInfo baseInfo = buildExpectedStructure();
  -        assertSameStructure( m_baseFolder, baseInfo );
  +        assertSameStructure( baseFolder, baseInfo );
       }
   
       /**
  @@ -630,19 +646,19 @@
       public void testExists() throws Exception
       {
           // Test a file
  -        FileObject file = m_baseFolder.resolveFile( "file1.txt" );
  +        FileObject file = baseFolder.resolveFile( "file1.txt" );
           assertTrue( "file exists", file.exists() );
   
           // Test a folder
  -        file = m_baseFolder.resolveFile( "dir1" );
  +        file = baseFolder.resolveFile( "dir1" );
           assertTrue( "folder exists", file.exists() );
   
           // Test an unknown file
  -        file = m_baseFolder.resolveFile( "unknown-child" );
  +        file = baseFolder.resolveFile( "unknown-child" );
           assertTrue( "unknown file does not exist", !file.exists() );
   
           // Test an unknown file in an unknown folder
  -        file = m_baseFolder.resolveFile( "unknown-folder/unknown-child" );
  +        file = baseFolder.resolveFile( "unknown-folder/unknown-child" );
           assertTrue( "unknown file does not exist", !file.exists() );
       }
   
  @@ -652,15 +668,15 @@
       public void testType() throws Exception
       {
           // Test a file
  -        FileObject file = m_baseFolder.resolveFile( "file1.txt" );
  +        FileObject file = baseFolder.resolveFile( "file1.txt" );
           assertSame( FileType.FILE, file.getType() );
   
           // Test a folder
  -        file = m_baseFolder.resolveFile( "dir1" );
  +        file = baseFolder.resolveFile( "dir1" );
           assertSame( FileType.FOLDER, file.getType() );
   
           // Test an unknown file
  -        file = m_baseFolder.resolveFile( "unknown-child" );
  +        file = baseFolder.resolveFile( "unknown-child" );
           try
           {
               file.getType();
  @@ -678,7 +694,7 @@
       public void testParent() throws FileSystemException
       {
           // Test when both exist
  -        FileObject folder = m_baseFolder.resolveFile( "dir1" );
  +        FileObject folder = baseFolder.resolveFile( "dir1" );
           FileObject child = folder.resolveFile( "file3.txt" );
           assertTrue( "folder exists", folder.exists() );
           assertTrue( "child exists", child.exists() );
  @@ -691,7 +707,7 @@
           assertSame( folder, child.getParent() );
   
           // Test when neither exists
  -        folder = m_baseFolder.resolveFile( "unknown-folder" );
  +        folder = baseFolder.resolveFile( "unknown-folder" );
           child = folder.resolveFile( "unknown-file" );
           assertTrue( "folder does not exist", !folder.exists() );
           assertTrue( "child does not exist", !child.exists() );
  @@ -699,7 +715,7 @@
   
           // Test the parent of the root of the file system
           // TODO - refactor out test cases for layered vs originating fs
  -        final FileSystem fileSystem = m_baseFolder.getFileSystem();
  +        final FileSystem fileSystem = baseFolder.getFileSystem();
           FileObject root = fileSystem.getRoot();
           if ( fileSystem.getParentLayer() == null )
           {
  @@ -719,7 +735,7 @@
       public void testChildren() throws FileSystemException
       {
           // Check for file
  -        FileObject file = m_baseFolder.resolveFile( "file1.txt" );
  +        FileObject file = baseFolder.resolveFile( "file1.txt" );
           assertSame( FileType.FILE, file.getType() );
           try
           {
  @@ -736,7 +752,7 @@
           assertNotNull( file );
   
           // Check for unknown file
  -        file = m_baseFolder.resolveFile( "unknown-file" );
  +        file = baseFolder.resolveFile( "unknown-file" );
           assertTrue( !file.exists() );
           try
           {
  @@ -758,9 +774,9 @@
        */
       public void testVFSClassLoader() throws Exception
       {
  -        final FileObject[] objects = { m_baseFolder };
  +        final FileObject[] objects = { baseFolder };
           VFSClassLoader loader =
  -            new VFSClassLoader( objects, m_manager );
  +            new VFSClassLoader( objects, manager );
   
           Class testClass = loader.loadClass( "code.ClassToLoad" );
           assertTrue( verifyPackage( testClass.getPackage() ) );
  @@ -771,7 +787,7 @@
           URL resource = loader.getResource( "file1.txt" );
           assertNotNull( resource );
           URLConnection urlCon = resource.openConnection();
  -        assertSameURLContent( m_charContent, urlCon );
  +        assertSameURLContent( charContent, urlCon );
       }
   
       /**
  @@ -795,13 +811,13 @@
        */
       public void testURL() throws Exception
       {
  -        FileObject file = m_baseFolder.resolveFile( "some-dir/" );
  +        FileObject file = baseFolder.resolveFile( "some-dir/" );
           URL url = file.getURL();
   
           assertEquals( file.getName().getURI(), url.toExternalForm() );
   
           URL parentURL = new URL( url, ".." );
  -        assertEquals( m_baseFolder.getURL(), parentURL );
  +        assertEquals( baseFolder.getURL(), parentURL );
   
           URL rootURL = new URL( url, "/" );
           assertEquals( file.getFileSystem().getRoot().getURL(), rootURL );
  @@ -813,12 +829,12 @@
       public void testURLContent() throws Exception
       {
           // Test non-empty file
  -        FileObject file = m_baseFolder.resolveFile( "file1.txt" );
  +        FileObject file = baseFolder.resolveFile( "file1.txt" );
           URLConnection urlCon = file.getURL().openConnection();
  -        assertSameURLContent( m_charContent, urlCon );
  +        assertSameURLContent( charContent, urlCon );
   
           // Test empty file
  -        file = m_baseFolder.resolveFile( "empty.txt" );
  +        file = baseFolder.resolveFile( "empty.txt" );
           urlCon = file.getURL().openConnection();
           assertSameURLContent( "", urlCon );
       }
  @@ -868,7 +884,7 @@
       public void testNoURLContent() throws Exception
       {
           // Try getting the content of a folder
  -        FileObject folder = m_baseFolder.resolveFile( "dir1" );
  +        FileObject folder = baseFolder.resolveFile( "dir1" );
           try
           {
               folder.getURL().openConnection().getInputStream();
  @@ -880,7 +896,7 @@
           }
   
           // Try getting the content of an unknown file
  -        FileObject unknownFile = m_baseFolder.resolveFile( "unknown-file" );
  +        FileObject unknownFile = baseFolder.resolveFile( "unknown-file" );
           URLConnection connection = unknownFile.getURL().openConnection();
           try
           {
  @@ -900,12 +916,12 @@
       public void testContent() throws Exception
       {
           // Test non-empty file
  -        FileObject file = m_baseFolder.resolveFile( "file1.txt" );
  +        FileObject file = baseFolder.resolveFile( "file1.txt" );
           FileContent content = file.getContent();
  -        assertSameContent( m_charContent, content );
  +        assertSameContent( charContent, content );
   
           // Test empty file
  -        file = m_baseFolder.resolveFile( "empty.txt" );
  +        file = baseFolder.resolveFile( "empty.txt" );
           content = file.getContent();
           assertSameContent( "", content );
       }
  @@ -955,7 +971,7 @@
       public void testNoContent() throws Exception
       {
           // Try getting the content of a folder
  -        FileObject folder = m_baseFolder.resolveFile( "dir1" );
  +        FileObject folder = baseFolder.resolveFile( "dir1" );
           try
           {
               folder.getContent().getInputStream();
  @@ -967,7 +983,7 @@
           }
   
           // Try getting the content of an unknown file
  -        FileObject unknownFile = m_baseFolder.resolveFile( "unknown-file" );
  +        FileObject unknownFile = baseFolder.resolveFile( "unknown-file" );
           FileContent content = unknownFile.getContent();
           try
           {
  @@ -995,16 +1011,16 @@
       public void testReuse() throws Exception
       {
           // Get the test file
  -        FileObject file = m_baseFolder.resolveFile( "file1.txt" );
  +        FileObject file = baseFolder.resolveFile( "file1.txt" );
           assertEquals( FileType.FILE, file.getType() );
   
           // Get the file content
           FileContent content = file.getContent();
  -        assertSameContent( m_charContent, content );
  +        assertSameContent( charContent, content );
   
           // Read the content again
           content = file.getContent();
  -        assertSameContent( m_charContent, content );
  +        assertSameContent( charContent, content );
   
           // Close the content + file
           content.close();
  @@ -1012,7 +1028,7 @@
   
           // Read the content again
           content = file.getContent();
  -        assertSameContent( m_charContent, content );
  +        assertSameContent( charContent, content );
       }
   
       /**
  
  
  

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


Mime
View raw message