You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/01/26 13:14:25 UTC

[jira] [Commented] (GROOVY-8065) Map created as org.springframework.http.HttpHeaders is empty in 2.4.8, works fine in 2.4.7

    [ https://issues.apache.org/jira/browse/GROOVY-8065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15839652#comment-15839652 ] 

Paul King commented on GROOVY-8065:
-----------------------------------

It looks like this commit:
https://github.com/apache/groovy/commit/2c226838ed
for GROOVY-5985 caused this change.

> Map created as org.springframework.http.HttpHeaders is empty in 2.4.8, works fine in 2.4.7
> ------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8065
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8065
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.8
>         Environment: Java 1.8.0_102
> OS X 10.10.5
>            Reporter: Andy Wilkinson
>
> 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:
> {noformat}
> @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
> {noformat}
> It works as expected with 2.4.7:
> {noformat}
> $ 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]]
> {noformat}
> With 2.4.8 the map is empty:
> {noformat}
> $ sdk use groovy 2.4.8 && groovy asHttpHeaders.groovy
> Using groovy version 2.4.8 in this shell.
> [:]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)