[hibernate-issues] [Hibernate-JIRA] Commented: (HV-585) Order of validation messages is lost

Gunther Schmidl (JIRA) noreply at atlassian.com
Fri May 11 06:59:09 EDT 2012


    [ https://hibernate.onjira.com/browse/HV-585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46611#comment-46611 ] 

Gunther Schmidl commented on HV-585:
------------------------------------

You're right on both counts, which is why I filed it as a possible improvement. It would be nice for this case to do what seems like the obvious thing ("add" appending messages to an ordered list), but I won't lose any sleep if it doesn't :-)

> Order of validation messages is lost
> ------------------------------------
>
>                 Key: HV-585
>                 URL: https://hibernate.onjira.com/browse/HV-585
>             Project: Hibernate Validator
>          Issue Type: Improvement
>          Components: engine
>    Affects Versions: 4.3.0.Final
>         Environment: ---
>            Reporter: Gunther Schmidl
>              Labels: hibernate, validation
>
> When adding validation messages, they are stored in an ArrayList. Later on, they are transferred to a HashSet, and finally to a String[] array. Naturally, putting them in a HashSet screws up the order of the messages, which may be important (for example, I have a "header" error message I wish to display first). Please consider changing the HashSet to a LinkedHashSet.

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