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

Map created as org.springframework.http.HttpHeaders is empty in 2.4.8, works fine in 2.4.7

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.8
    • 2.4.9
    • None
    • None
    • Java 1.8.0_102
      OS X 10.10.5

    Description

      There appears to be a regression in Groovy 2.4.8 that causes it to silently create an empty map when it's asked to create it as an instance of Spring Framework's HttpHeaders.

      Here's a minimal reproduction:

      @Grab("org.springframework:spring-web:4.3.5.RELEASE")
      import org.springframework.http.HttpHeaders
      
      def headers = ['Content-Type'       : 'application.json',
                     'Content-Disposition': 'test.zip'] as HttpHeaders
      
      println headers
      

      It works as expected with 2.4.7:

      $ sdk use groovy 2.4.7 && groovy asHttpHeaders.groovy
      
      Using groovy version 2.4.7 in this shell.
      [Content-Type:[application.json], Content-Disposition:[test.zip]]
      

      With 2.4.8 the map is empty:

      $ sdk use groovy 2.4.8 && groovy asHttpHeaders.groovy
      
      Using groovy version 2.4.8 in this shell.
      [:]
      

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              awilkinson Andy Wilkinson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: