commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30858] New: - Save of properties in PropertyConfiguration does not take basePath into account
Date Thu, 26 Aug 2004 07:17:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30858>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30858

Save of properties in PropertyConfiguration does not take basePath into account

           Summary: Save of properties in PropertyConfiguration does not
                    take basePath into account
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: hermod.opstvedt@dnb.no


When using ConfigurationFactory with a config.xml file that contans multiple 
properties files one can iterate through is and get each Configuration. You can 
then use one of these (Typecasting it to the proper type) directly. However, 
when for instance trying to do saveProperty with the PropertiesConfiguration it 
uses the fileName property instead of the basePath (which contains the absolute 
reference) from its superclass. This results in the file being created at 
whatever the current path is, instead of where it actually got the file in the 
first place. Propesed fix is :
    /**
     * Save the configuration to the file specified by the fileName attribute.
     */
    public void save() throws ConfigurationException
    {
//        save(fileName);
          save(getBasePath());
    }

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