Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.8
-
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
- is related to
-
GROOVY-5001 Map access is given higher precedence when trying to access fields/properties in classes which implement java.util.Map or extend java.util.HashMap or java.util.Properties
- Closed
-
GROOVY-5985 Invalid hash key "serialVersionUID"
- Closed
- links to