You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/10/15 19:30:08 UTC
DO NOT REPLY [Bug 32748] -
[beanutils]special characters in mapped property keys are parsed incorrectly
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