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

null's in lists are not handled correctly for unique(), sort()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-1
    • 1.1-beta-2
    • None
    • None

    Description

      For this list:

      def x = [1, 2, 3, 1, 2, 3, null, 'a', null]
      

      Both these throw NPE:

      println x.unique()
      println x.sort()
      

      Attachments

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: