Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-285

<configuration fileName="local-configuration.xml" config-optional="true" /> does not report parsing errors in local-configuration.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 1.5
    • None
    • None

    Description

      I'm trying to build a configuration system to be shared between our Java applications. I therefore want to have optional configurations included from the main configuration file read by DefaultConfigurationBuilder

      <configuration fileName="local-configuration.xml" config-optional="true" />

      I have found that if the sub-configuration file is invalid the error is silently ignored. The same without config-options="true" results in a ConfigurationException to be thrown (which wraps a ConfigurationRuntimeException which wraps the ConfigurationException which wraps the SAXException).

      I believe that the behaviour is incorrect. The sub-configuration file should be skipped if not found, but any errors found when parsing the existing file should be logged.

      Attachments

        Activity

          People

            oheger Oliver Heger
            ravn Thorbjørn Ravn Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: