commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CONFIGURATION-284) ability to read OS environment variables
Date Tue, 23 Oct 2007 20:11:50 GMT

     [ https://issues.apache.org/jira/browse/CONFIGURATION-284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oliver Heger resolved CONFIGURATION-284.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5

The patch was applied with some modifications:
- The code in the constructor for obtaining the environment properties was refactored into
new methods. This makes testing much easier.
- For the check of the Java version SystemUtils from commons-lang is  used; we depend on lang
anyway.
- The used getenv() method is available since 1.5 only. To make the class compile on earlier
versions, the method has to be invoked per reflection.
- Some additional methods have been overridden to ensure that the configuration is read-only.
- A unit test was added.

I did some testing on Java 1.5 and on earlier versions as well. Everything seems to work.

> ability to read OS environment variables
> ----------------------------------------
>
>                 Key: CONFIGURATION-284
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-284
>             Project: Commons Configuration
>          Issue Type: New Feature
>          Components: Interpolation
>            Reporter: Aksel Schmidt
>            Assignee: Oliver Heger
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: CONFIGURATION-284.patch, EnvironmentConfiguration.java
>
>
> suggestion:
> interpolation with system environment, i.e.
> ${sys:user.name} reads from systemproperties (as of today)
> ${sysenv:TEMP} reads from OS environment
> these can be parsed from a supported set of OS's - windows read from a set in a "cmd
/c", unix/linux from an "env" etc. (just once on demand)

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