commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration AbstractFileConfiguration.java
Date Wed, 17 Nov 2004 00:18:00 GMT
ebourg      2004/11/16 16:18:00

  Modified:    configuration/src/java/org/apache/commons/configuration
                        AbstractFileConfiguration.java
  Log:
  The constructor AbstractFileConfiguration(String) now relies on setFileName() instead of
duplicating the logic.
  This provides an alternate fix to Bug 32236 with a modification to ConfigurationUtils.getBasePath.
  
  Revision  Changes    Path
  1.9       +4 -10     jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java
  
  Index: AbstractFileConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AbstractFileConfiguration.java	14 Nov 2004 18:29:02 -0000	1.8
  +++ AbstractFileConfiguration.java	17 Nov 2004 00:18:00 -0000	1.9
  @@ -76,14 +76,7 @@
           this();
   
           // store the file name
  -        this.fileName = fileName;
  -
  -        // locate the file
  -        url = ConfigurationUtils.locate(fileName);
  -        if(url == null)
  -        {
  -            throw new ConfigurationException(fileName + " could not be found!");
  -        }
  +        setFileName(fileName);
   
           // update the base path
           setBasePath(ConfigurationUtils.getBasePath(url));
  @@ -496,7 +489,7 @@
       }
   
       /**
  -     * The URL where the configuration is stored.
  +     * Set the URL where the configuration is stored.
        *
        * @param url
        */
  @@ -508,6 +501,7 @@
           basePath = ConfigurationUtils.getBasePath(url);
           if (basePath != null && basePath.startsWith("file:"))
           {
  +            // remove the "file:" prefix from file URLs
               basePath = basePath.substring(5);
           }
   
  
  
  

---------------------------------------------------------------------
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