[ http://issues.apache.org/jira/browse/CONFIGURATION-243?page=all ]
Oliver Heger resolved CONFIGURATION-243.
----------------------------------------
Fix Version/s: Nightly Builds
Resolution: Fixed
The new feature was added. The user guide was also updated.
> Improve handling of optional configurations in DefaultConfigurationBuilder
> --------------------------------------------------------------------------
>
> Key: CONFIGURATION-243
> URL: http://issues.apache.org/jira/browse/CONFIGURATION-243
> Project: Commons Configuration
> Issue Type: Improvement
> Affects Versions: 1.3 Final
> Reporter: Oliver Heger
> Assigned To: Oliver Heger
> Priority: Minor
> Fix For: Nightly Builds
>
>
> So far a configuration declared as optional in the configuration definition
> file won't be added to the resulting combined configuration when its
> initialization causes an error. There are use cases where this behavior is
> not appropriate:
> Consider as an example an application that needs to store user specific
> settings in a user configuration file (e.g. stored in the user's home
> directory). The application's configuration definition file would include
> this user configuration and declare it as optional. When a user starts this
> application for the first time the user configuration does not exist; so its
> creation will cause an error and it won't be added to the combined
> configuration. Now every time the application wants to access the user
> configuration it has to check whether it exists and manually create it if
> necessary. Here it would be much easier if an empty configuration of the
> correct type was added to the combined configuration.
> This behavior could be controlled by an additional reserved attribute
> config-forceCreate of a configuration declaration.
> By the way: The nested class ConfigurationDeclaration of
> DefaultConfigurationBuilder should be public. This makes the implementation
> of custom configuration providers easier.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]