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 25050] - getValue() and iterate() are not consistent
Date Fri, 23 Jan 2004 01:16:58 GMT
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=25050>.
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=25050

getValue() and iterate() are not consistent

dmitri@plotnix.com changed:

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



------- Additional Comments From dmitri@plotnix.com  2004-01-23 01:16 -------
The problem turned out to be much deeper than what the provide patch would 
indicate. The crux of the issue was that DynamicPropertyIterator was based on 
the assumption that a Map "contains" any property you would ask for. For 
example, if you have a JavaBean that has no property called "foo", the 
path "/foo" throws an exception - there is no such property.  However, if 
instead of a JavaBean we have a Map, the path "/foo" does not throw an 
exception. Rater, it returns null.  The property exists, but has not been 
initialized.

There is nothing wrong with this logic until you start searching with paths 
like "//foo".  As soon as the search encounters a Map, it stops because the 
Map "contains" a "property" called "foo". That of course is unacceptable, so I 
had to make some changes here and there to differentiate between regular 
traversal like "/foo" and search like "//foo".

---------------------------------------------------------------------
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