[hibernate-issues] [Hibernate-JIRA] Updated: (HV-445) Ensure meta models are completely immutable

Hardy Ferentschik (JIRA) noreply at atlassian.com
Mon Jan 30 11:26:13 EST 2012


     [ http://opensource.atlassian.com/projects/hibernate/browse/HV-445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hardy Ferentschik updated HV-445:
---------------------------------

    Fix Version/s:     (was: 4.3.0.Alpha1)
                   4.3.0.next

> Ensure meta models are completely immutable 
> --------------------------------------------
>
>                 Key: HV-445
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-445
>             Project: Hibernate Validator
>          Issue Type: Improvement
>          Components: engine
>            Reporter: Gunnar Morling
>             Fix For: 4.3.0.next
>
>
> The internal meta model (BeanMetaDataImpl et al.) as well as the external one (BeanDescriptorImpl et al.) should be completely unmodifiable, as they could potentially be accessed from multiple threads at the same time.
> I made some more fields final/unmodifiable with HV-371, but there are some places left which I couldn't change easily and need some more consideration:
> * ConstraintDescriptorImpl#compositionType
> * ElementDescriptorImpl#constraintDescriptors
> * BeanMetaDatImpl#cascadedMembers (could be made unmodifiable after initialization instead of creating a new unmodifiable set with each call of getCascadedMembers()
> When looking through the model I found it quite complex to find out which collection fields are already unmodifiable and which not. I therefore thought about introducing a marker annotation @Unmodifiable which could be used to document unmodifiable fields. WDYT?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list