commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-353) Allow Commons Configuration to set system properties
Date Wed, 24 Jun 2009 20:41:07 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723726#action_12723726
] 

Emmanuel Bourg commented on CONFIGURATION-353:
----------------------------------------------

That change is weird. Why does it work only with PropertiesConfiguration? I would have preferred
adding a single method taking any configuration, and let the DefaultConfigurationBuilder deal
with the source configuration. That looks cleaner to me. Initializing the system properties
would look like this:

SystemConfiguration.setSystemProperties(new PropertiesConfiguration("system.properties"));

Alternatively, this could have been solved without modifying SystemConfiguration by using
a simple copy:

ConfigurationUtils.copy(new PropertiesConfiguration("system.properties"), new SystemConfiguration());


> Allow Commons Configuration to set system properties
> ----------------------------------------------------
>
>                 Key: CONFIGURATION-353
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-353
>             Project: Commons Configuration
>          Issue Type: New Feature
>    Affects Versions: 1.6
>         Environment: All
>            Reporter: Ralph Goers
>             Fix For: 1.6
>
>
> SystemConfiguration allows the system properties to be accessed as a configuration and
used in a combined configuration. However, no mechanism is available to set system properties
from an external file. Such a facility would alleviate having to place a bunch of -D options
on the command line.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message