You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by ext2 <xu...@tongtech.com> on 2011/03/21 08:03:47 UTC
character '\''s escape value is not correctly in Karaf's dynamic configurations
Hi:
Karaf support using Properties files to store dynamic
configurations. But it seems the escape value of '\' is not correctly. For
example: if I write such a properties:
keyA=\\\\
The value of KeyA should be two '\' character. But karaf's configurations is
readed the value as a single '\' character.
Why? Is it a bug?
Thanks a any suggestion;
Re: character '\''s escape value is not correctly in Karaf's dynamic configurations
Posted by Andreas Pieber <an...@gmail.com>.
Hey ext2,
Just saw that this problem was now untouched for some time. Somehow
this really sounds like a bug to me. Can you please create a JIRA for
this problem that we do not loose track of it?
Thanks and kind regards,
Andreas
On Mon, Mar 21, 2011 at 11:57 AM, ext2 <xu...@tongtech.com> wrote:
>
> Thanks Jean-Baptiste
>
> I have tried as you said. But it doesn't work..
> If I configure keyA="\\", the actually readed String in memory is
> String("\"\\\"") (three character, [0]= '\"', [1]='\\', [2]='\"').
>
> But I actually want configure this value as a string which contains two '\'
> character ;
>
>
> ------------------------original message -----
> Sender: Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> Date: 2011/3/21 15:14
> Receiver: user@karaf.apache.org
> Subject: Re: character '\''s escape value is not correctly in Karaf's
> dynamic configurations
>
> Hi,
>
> The \ character is already escaped by Karaf Properties implementation.
>
> Try to use:
>
> keyA="\\"
>
> It will be equivalent to \\\\ (with the first \ as escape character).
>
> Regards
> JB
>
> On 03/21/2011 08:03 AM, ext2 wrote:
>>
>> Hi:
>> Karaf support using Properties files to store dynamic
>> configurations. But it seems the escape value of '\' is not correctly. For
>> example: if I write such a properties:
>> keyA=\\\\
>>
>> The value of KeyA should be two '\' character. But karaf's configurations
> is
>> readed the value as a single '\' character.
>> Why? Is it a bug?
>>
>> Thanks a any suggestion;
>>
>>
>>
>
>
>
Re: character '\''s escape value is not correctly in Karaf's dynamic configurations
Posted by ext2 <xu...@tongtech.com>.
Thanks Jean-Baptiste
I have tried as you said. But it doesn't work..
If I configure keyA="\\", the actually readed String in memory is
String("\"\\\"") (three character, [0]= '\"', [1]='\\', [2]='\"').
But I actually want configure this value as a string which contains two '\'
character ;
------------------------original message -----
Sender: Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
Date: 2011/3/21 15:14
Receiver: user@karaf.apache.org
Subject: Re: character '\''s escape value is not correctly in Karaf's
dynamic configurations
Hi,
The \ character is already escaped by Karaf Properties implementation.
Try to use:
keyA="\\"
It will be equivalent to \\\\ (with the first \ as escape character).
Regards
JB
On 03/21/2011 08:03 AM, ext2 wrote:
>
> Hi:
> Karaf support using Properties files to store dynamic
> configurations. But it seems the escape value of '\' is not correctly. For
> example: if I write such a properties:
> keyA=\\\\
>
> The value of KeyA should be two '\' character. But karaf's configurations
is
> readed the value as a single '\' character.
> Why? Is it a bug?
>
> Thanks a any suggestion;
>
>
>
Re: character '\''s escape value is not correctly in Karaf's dynamic
configurations
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
The \ character is already escaped by Karaf Properties implementation.
Try to use:
keyA="\\"
It will be equivalent to \\\\ (with the first \ as escape character).
Regards
JB
On 03/21/2011 08:03 AM, ext2 wrote:
>
> Hi:
> Karaf support using Properties files to store dynamic
> configurations. But it seems the escape value of '\' is not correctly. For
> example: if I write such a properties:
> keyA=\\\\
>
> The value of KeyA should be two '\' character. But karaf's configurations is
> readed the value as a single '\' character.
> Why? Is it a bug?
>
> Thanks a any suggestion;
>
>
>