commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32748] - [beanutils]special characters in mapped property keys are parsed incorrectly
Date Sat, 15 Oct 2005 17:30:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32748>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32748





------- Additional Comments From d2000m@hotmail.com  2005-10-15 19:30 -------
(In reply to comment #1)
> I'm not sure I see any way around this.  Do you have any ideas?

The issue is a very important one, because many times developers have no 
control over the characters in the keys of map-backed propeties.  A solution 
could be to enhance the expression syntax to recognize escape sequences inside 
the parenthesis representing map-backed property keys.

Consider this example:

Line 1: myBean.setMyMapBackedProp("foo).bar(baz", "myValue");
Line 2: myBean.getMyMapBackedProp("foo").setBar("baz", "myValue);

Line 3: BeanUtils.setProperty(myBean, "myMapBackedProp(foo).bar
(baz)", "myValue");

Line 3 would currently have the same effect as Line 2.  What if we want to use 
BeanUtils to achieve the effect of Line 1 instead of the effect of Line 2?  

Suppose that BeanUtils expression syntax for map-backed property keys were 
enhanced slightly to recognize these escape sequences:
"\(" for "("
"\." for "."
"\)" for ")"

Then we could use BeanUtils to achieve the effect of Line 1 as follows:

Line 4: BeanUtils.setProperty(myBean, "myMapBackedProp
(foo\.bar\(baz)", "myValue");


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message