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

Oliver Heger resolved CONFIGURATION-283.
----------------------------------------

    Resolution: Fixed

A fix was applied to ConfigurationUtils.convertToHierarchical(), which was the 
source of the problem.

This is a simple workaround for the problem with ConfigurationUtils.copy(). We 
might want to touch this again when this problem is solved. But for the moment 
everything works fine.

> CombinedConfiguration doesn't take escaped characters into account.
> -------------------------------------------------------------------
>
>                 Key: CONFIGURATION-283
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-283
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Franck Valentin
>            Assignee: Oliver Heger
>             Fix For: 1.5
>
>
> Hi, 
> I've tried to used CombinedConfiguration but it seems escaped characters are 
> not taken into account :
> import org.apache.commons.configuration.CombinedConfiguration;
> import org.apache.commons.configuration.ConfigurationException;
> import org.apache.commons.configuration.PropertiesConfiguration;
> import junit.framework.TestCase;
> public class TestProp extends TestCase {
>       
>       public void testprop() throws ConfigurationException {
>               // test.properties contains :
>               //    without_escape=aa,bb
>               //    with_escape=aa\,bb
>               //    with_2escapes=aa\\,bb
>               
>               String prop_filename = "c:\\tmp\\test.properties";
>               PropertiesConfiguration properties_config = new 
> PropertiesConfiguration(prop_filename);
>               CombinedConfiguration   combined_config   = new 
> CombinedConfiguration();
>               combined_config.addConfiguration(properties_config);
>               
>               System.out.println("Properties config");
>               
> System.out.println(properties_config.getString("without_escape"));
>               System.out.println(properties_config.getString("with_escape"));
>               
> System.out.println(properties_config.getString("with_2escapes"));
>               System.out.println("\nCombined config");
>               System.out.println(combined_config.getString("without_escape"));
>               System.out.println(combined_config.getString("with_escape"));
>               System.out.println(combined_config.getString("with_2escapes"));
>               
>       }
> }
> Result : 
> ---------
> Properties config
> aa
> aa,bb
> aa,bb
> Combined config
> aa
> aa
> aa
> Thanks !
> Franck

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to