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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.5
    • Fix Version/s: 1.8.6, 2.0-beta-3
    • Component/s: None
    • Labels:
      None
    • Environment:
      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

            • Assignee:
              Guillaume Guillaume Delcroix
              Reporter:
              fxg Fran├žois-Xavier Guillemette
            • Votes:
              4 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: