You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org> on 2008/04/04 00:37:26 UTC
[jira] Commented: (XMLBEANS-252) List returned by generated
getFooList() is not sortable
[ https://issues.apache.org/jira/browse/XMLBEANS-252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585328#action_12585328 ]
Radu Preotiuc-Pietro commented on XMLBEANS-252:
-----------------------------------------------
I am able to reproduce this on my box; looking into it to see if I can fix.
> List<Type> returned by generated getFooList() is not sortable
> -------------------------------------------------------------
>
> Key: XMLBEANS-252
> URL: https://issues.apache.org/jira/browse/XMLBEANS-252
> Project: XMLBeans
> Issue Type: Bug
> Affects Versions: Version 2.1
> Environment: Win XP SP2, JRE 1.5.0_06-b05, XMLBeans 2.1.0
> Reporter: Erik Godding Boye
> Priority: Critical
>
> I am trying to sort the list returned by the generated getFooList() [multiple occurrence method] using java.util.Collections#sort(java.util.List<Type>, java.util.Comparator<Type>). The elements are not sorted, and no exception is thrown. I would expect either, but I do not see any reason for the list to be unmodifiable (and thus throwing exception when trying to sort it). A simple workaround is to create a new list supplying the original list (from the generated method) in the constructor. The new list is sortable without any problems.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org