[hibernate-issues] [Hibernate-JIRA] Commented: (HV-128) Support Iterable

Hardy Ferentschik (JIRA) noreply at atlassian.com
Wed Mar 18 10:51:38 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32666#action_32666 ] 

Hardy Ferentschik commented on HV-128:
--------------------------------------

I believe the ReflectionHelper method are partly legacy from the beancheck prototype. isCollectionClass is probably the wrong name for the method. It should be called isIndexableClass. I guess the idea was to just list all "indexable" classes.
What about the limitations on the property path for sets, maps and Iterables? In these cases the property path is not a valid path in the sense of the Java Beans spec since I cannot navigate from the property. Or is it? 

> Support Iterable
> ----------------
>
>                 Key: HV-128
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-128
>             Project: Hibernate Validator
>          Issue Type: Improvement
>          Components: engine
>    Affects Versions: 4.0.0.Alpha2
>            Reporter: Emmanuel Bernard
>            Assignee: Hardy Ferentschik
>             Fix For: 4.0.0.Alpha3
>
>
> I tried to implement it myself but several part of the code held me off.
> It seems ReflectionHelper is fairly buggy.
> The idea was to convert isCollection, getCollectionClass, isCollectionClass to isIterable, getIterableClass, isIterableClass. It is straightforward except that in various places, the code expect Map to be a subclass of Collection which it is *not*:
>    ReflectionHelper.getIndexedType assumes so
>    ReflectionHelper.getIndexedValue assumes so
> I suspect Map is not tested.
> Also the code seems to consider every Collection as indexed (but I might be wrong)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list