You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Andy Wilkinson (JIRA)" <ji...@apache.org> on 2017/01/25 13:47:26 UTC
[jira] [Created] (GROOVY-8065) Map created as
org.springframework.http.HttpHeaders is empty in 2.4.8, works fine in 2.4.7
Andy Wilkinson created GROOVY-8065:
--------------------------------------
Summary: 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)