You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Siddiqui Najam <Na...@gemalto.com> on 2010/03/10 19:28:11 UTC

Bug in CommentedProperties

Hi,

There seems to be a bug in CommentedProperties store() method, it is not saving escaped characters correctly.

Say there is a property in property file
TestProperty=this has an escaped characters in it \\ and \=.

This property is read correctly but when the file is saved using the store() method the property is saved as
TestProperty=this has an escaped characters in it \ and =.
So when it is read the next time the backward slash and "=" are lost.

If we save the same file with Properties object, it is saved correctly as
TestProperty=this has an escaped characters in it \\ and \=.

The test was done with the latest nightly build on March 10, 2010.

Regards,
Najam

RE: Bug in CommentedProperties

Posted by Siddiqui Najam <Na...@gemalto.com>.
Sorry, "=" is not an escape sequence. The issue is only with the backward  slash.

-----Original Message-----
From: Siddiqui Najam [mailto:Najam.Siddiqui@gemalto.com] 
Sent: Wednesday, March 10, 2010 12:28 PM
To: jspwiki-user@incubator.apache.org
Subject: Bug in CommentedProperties

Hi,

There seems to be a bug in CommentedProperties store() method, it is not saving escaped characters correctly.

Say there is a property in property file
TestProperty=this has an escaped characters in it \\ and \=.

This property is read correctly but when the file is saved using the store() method the property is saved as
TestProperty=this has an escaped characters in it \ and =.
So when it is read the next time the backward slash and "=" are lost.

If we save the same file with Properties object, it is saved correctly as
TestProperty=this has an escaped characters in it \\ and \=.

The test was done with the latest nightly build on March 10, 2010.

Regards,
Najam