You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/09/23 16:39:20 UTC

DO NOT REPLY [Bug 36784] New: - ConfigurationConverter.getProperties() and interpolate behaviour inconsequent with getList()

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36784>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36784

           Summary: ConfigurationConverter.getProperties() and interpolate
                    behaviour inconsequent with getList()
           Product: Commons
           Version: 1.1 Final
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: mech@tngtech.com
                CC: mech@tngtech.com


Hi,

when converting a Configuration object into a Properties object no variable
interpolation takes place. E.g. you have a PropertiesConfiguration with:
foo=bar
interpolated=${foo}

If you dump the Properties object or use .getProperty("interpolated") you will
get "${foo}" instead of "bar".
If you convert the Configuration one would expect the real/interpolated values
for use with a legacy method (or just any JDK method that just takes Properties).

But as the converter uses Configuration.getList(key) that doesn't interpolate
(why does getList not interpolate?) this doesn't happen. Probably one could just
use getStringArray() instead as this method does interpolate.
Is there a reason for AbstractConfiguration.getStringArray() working differently
compared to getList() with regard to variable interpolation? At least a Javadoc
note would be good, or did one just forget to call "interpolate" in both?

Moreover it would be logical if getProperties() & related methods would allow to
specify a separator char as ", " is nice to print but is more difficult to parse
than just ",". Actually the AbstractConfiguration.setDelimiter() functionality
would make it reasonable to allow the user to modify the default also when
converting vice versa.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org