Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-252

List<Type> returned by generated getFooList() is not sortable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Won't Fix
    • Version 2.1
    • None
    • None
    • None
    • Win XP SP2, JRE 1.5.0_06-b05, XMLBeans 2.1.0

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            erikgb Erik Godding Boye
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: