commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amitabh Pandey (JIRA)" <>
Subject [jira] [Commented] (CONFIGURATION-700) Issue With backslash(\) and Forwardslash(/)
Date Wed, 09 May 2018 03:52:00 GMT


Amitabh Pandey commented on CONFIGURATION-700:

Hi Heger,Thanks for the reply.As per your suggestion I have used commons-configuration2-2.0.jar

Now found one of my issue has been resolved. Now slash is coming properly after modification.

Thanks for this.

Here is my code which I am using

FileBasedConfigurationBuilder<PropertiesConfiguration> {color:#6a3e3e}builder{color}
= *{color:#7f0055}new{color}* FileBasedConfigurationBuilder<PropertiesConfiguration>(


 .configure(*{color:#7f0055}new{color}* Parameters().properties().setFileName({color:#2a00ff}""{color})


 PropertiesConfiguration {color:#6a3e3e}config{color} = {color:#6a3e3e}builder{color}.getConfiguration();

{color:#6a3e3e}config{color}.setProperty({color:#2a00ff}"Id"{color}, {color:#2a00ff}"3"{color});


 System.*_{color:#0000c0}out{color}_*.println({color:#2a00ff}" updated Successfully!!"{color});

Now still one issue is pending of backslash.Now it is not removing as previously but it is
getting converted in two backslash. Below is the sample

*Before:  C\*

*After updation*


Please let me know if there is any fix for this also as we have already escaped value in property
file with \.

So it should not be change after any other value in property file.



> Issue With backslash(\) and Forwardslash(/)
> -------------------------------------------
>                 Key: CONFIGURATION-700
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.10
>            Reporter: Amitabh Pandey
>            Priority: Major
>             Fix For: 1.10
> Dear Team,
> I am using commons-configuration-1.10.jar for updating property file in java.
> I have achieve all my requirement(Preserve comment, White space) with this API.But stuck
at one point.It is not working as per my expectations with slash.Below is one example.
> I have below url in my properties file.
> *C\*
> Now it is getting change to below after modification
> *\/wsdl*
> Means it is removing the backslash and changing forwardslash to \/.I know it is escaping
character. But is there any way to prevent this. I cant not change any thing in property file.
I have to handle through code only. Because of only this issue I again moved to Java util
> Please check fix of this. Rest is excellent.

This message was sent by Atlassian JIRA

View raw message