commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Commented] (CONFIGURATION-700) Issue With backslash(\) and Forwardslash(/)
Date Fri, 11 May 2018 14:59:00 GMT


Sebb commented on CONFIGURATION-700:

Yes, I used v 2.2 (I had assumed you were using 1.10, based on the initial issue, however
I now see your code was written for 2.2).

See the Test-input and Test-output attachments for the behaviour I am seeing.

Note that provided the code that reads the property file using standard methods (such as java.util.Properties),
it won't matter that
is replaced by

If it *does* make a difference to your app, then the input file format is not a standard properties
format, and you cannot expect Commons Configuration to preserve the exact syntax. In which
case I suggest you use some form of text editor which can preserve the exact layout.

To show that the two files are equivalent (apart from the value of id) I wrote a program to
show how java.util.Properties processes the input:

> 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
>         Attachments: Getting Output.jpg, Original Property File Contenet.jpg
> 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