Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4742

Documentation for Collection.sort(Comparator comparator) is wrong

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.1
    • Component/s: groovy-jdk
    • Labels:
      None

      Description

      The documentation for Collection.sort(Comparator comparator) at http://groovy.codehaus.org/groovy-jdk/java/util/Collection.html#sort%28java.util.Comparator%29 states

      Sorts the Collection using the given comparator. The elements are sorted into a new list, and the existing collection is unchanged.

      However, it does seem to mutate the original list

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              tim_yates Tim Yates
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: