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 2002/09/21 12:01:40 UTC

DO NOT REPLY [Bug 10478] - Can't use . (dot) in mapped properties

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10478>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10478

Can't use . (dot) in mapped properties

jakarta@tichny.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |



------- Additional Comments From jakarta@tichny.org  2002-09-21 10:01 -------
The fix introduced breaks the following syntax:
BeanUtils.getProperty("a.b(x)"), i.e. a simple nested property before the mapped
property.

This is due to lines 711ff in PropertyUtils.java:

 indexOfMAPPED_DELIM2 = name.indexOf(MAPPED_DELIM2);
 if (indexOfMAPPED_DELIM2 >= 0) {
     indexOfNESTED_DELIM =
        name.indexOf(NESTED_DELIM, indexOfMAPPED_DELIM2);
 } else {
     indexOfNESTED_DELIM = name.indexOf(NESTED_DELIM);
 }
 if (indexOfNESTED_DELIM < 0) {
     break;
 }

so the example ends up in looking up a mappedProperty "a.b" with key "x" which
finally leads to an "IllegalArgumentException: object is
not an instance of declaring class" (the gett-method looked up on "b" is called
on bean "a" in "getMappedProperty()")

roland

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] [Bug 10478] - Can't use . (dot) in mapped properties

Posted by Roland Huss <Ro...@consol.de>.
--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>

Re: [PATCH] [Bug 10478] - Can't use . (dot) in mapped properties

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi roland

when i run your test case (without your fix applied) against CVS HEAD, i 
don't get a failure. could you confirm that the test case works (or supply 
one that does)?

- robert

On Saturday, September 21, 2002, at 01:38 PM, Roland Huss wrote:

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


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[PATCH] [Bug 10478] - Can't use . (dot) in mapped properties

Posted by Roland Huss <Ro...@consol.de>.
--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>