Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-15

[configuration] PropertyConfiguration.save() does not take basePath into account

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      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()); }

        Activity

        Henri Yandell made changes -
        Affects Version/s Nightly Builds [ 12311710 ]
        Henri Yandell made changes -
        Key COM-1508 CONFIGURATION-15
        Affects Version/s Nightly Builds [ 12311648 ]
        Project Commons [ 12310458 ] Commons Configuration [ 12310467 ]
        Component/s Configuration [ 12311107 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 30858 12341660
        Hermod Opstvedt created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Hermod Opstvedt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development