You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by cz...@apache.org on 2003/07/14 20:51:05 UTC

cvs commit: avalon-excalibur/store/src/java/org/apache/excalibur/store/impl AbstractJispFilesystemStore.java

cziegeler    2003/07/14 11:51:05

  Modified:    store/src/java/org/apache/excalibur/store/impl
                        AbstractJispFilesystemStore.java
  Log:
  Removing unused code
  
  Revision  Changes    Path
  1.10      +4 -51     avalon-excalibur/store/src/java/org/apache/excalibur/store/impl/AbstractJispFilesystemStore.java
  
  Index: AbstractJispFilesystemStore.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/store/src/java/org/apache/excalibur/store/impl/AbstractJispFilesystemStore.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractJispFilesystemStore.java	14 Jul 2003 18:17:23 -0000	1.9
  +++ AbstractJispFilesystemStore.java	14 Jul 2003 18:51:05 -0000	1.10
  @@ -81,8 +81,6 @@
   
       /** The directory repository */
       protected File m_directoryFile;
  -    /** The path to the directory */
  -    protected volatile String m_directoryPath;
   
       /** The database  */   
       protected IndexedObjectDatabase m_Database;
  @@ -92,24 +90,11 @@
       /**
        * Sets the repository's location
        */
  -    public void setDirectory(final String directory)
  -    throws IOException 
  -    {
  -        this.setDirectory(new File(directory));
  -    }
  -
  -    /**
  -     * Sets the repository's location
  -     */
       public void setDirectory(final File directory)
       throws IOException 
       {
           this.m_directoryFile = directory;
   
  -        /* Save directory path prefix */
  -        this.m_directoryPath = this.getFullFilename(this.m_directoryFile);
  -        this.m_directoryPath += File.separator;
  -
           /* Does directory exist? */
           if (!this.m_directoryFile.exists()) 
           {
  @@ -117,36 +102,26 @@
               if (!this.m_directoryFile.mkdirs()) 
               {
                   throw new IOException(
  -                "Error creating store directory '" + this.m_directoryPath + "': ");
  +                "Error creating store directory '" + this.m_directoryFile.getAbsolutePath() + "'. ");
               }
           }
   
           /* Is given file actually a directory? */
           if (!this.m_directoryFile.isDirectory()) 
           {
  -            throw new IOException("'" + this.m_directoryPath + "' is not a directory");
  +            throw new IOException("'" + this.m_directoryFile.getAbsolutePath() + "' is not a directory");
           }
   
           /* Is directory readable and writable? */
           if (!(this.m_directoryFile.canRead() && this.m_directoryFile.canWrite())) 
           {
               throw new IOException(
  -                "Directory '" + this.m_directoryPath + "' is not readable/writable"
  +                "Directory '" + this.m_directoryFile.getAbsolutePath() + "' is not readable/writable"
               );
           }
       }
      
       /**
  -     * Returns the repository's full pathname
  -     *
  -     * @return the directory as String
  -     */
  -    public String getDirectoryPath() 
  -    {
  -        return this.m_directoryPath;
  -    }
  -
  -    /**
        * Returns a Object from the store associated with the Key Object
        *
        * @param key the Key object
  @@ -367,28 +342,6 @@
       private KeyObject wrapKeyObject(Object key) 
       {
           return new JispKey( key );
  -    }
  -
  -    /**
  -     * Get the complete filename corresponding to a (typically relative)
  -     * <code>File</code>.
  -     * This method accounts for the possibility of an error in getting
  -     * the filename's <i>canonical</i> path, returning the io/error-safe
  -     * <i>absolute</i> form instead
  -     *
  -     * @param file The file
  -     * @return The file's absolute filename
  -     */
  -    public String getFullFilename(File file)
  -    {
  -        try
  -        {
  -            return file.getCanonicalPath();
  -        }
  -        catch (Exception e)
  -        {
  -            return file.getAbsolutePath();
  -        }
       }
   
       class BTreeObjectEnumeration implements Enumeration 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org