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

Sorting a map then passing it to JsonBuilder results in a NullPointerException only in 1.8.5

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.5
    • 1.8.6, 2.0-beta-3
    • None
    • None
    • Mac OSX Lion

    Description

      import groovy.json.*
      
      aMap = [a:1, b:2, c:3]
      new JsonBuilder(aMap) // works as expected
      
      aMap = [a:1, b:2, c:3].sort()
      new JsonBuilder(aMap) // fails with a NullPointerException in 1.8.5. Works as expected in 1.8.4
      

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            fxg François-Xavier Guillemette
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: