Skip to content

Erroneous "0" returned where empty string expected in call through the RestTemplate [SPR-9832] #14465

@spring-projects-issues

Description

@spring-projects-issues

Mattias Severson opened SPR-9832 and commented

The RestTemplate erroneously infers "0" for an empty string values.

  1. Execute the attached test RestTemplateTest using the attached pom.xml file.
  2. The test fails, the response from the RestTemplate is {"lhs":"1 U.S. dollar","rhs":"1 U.S. dollar","error":"0","icc":true}

For comparison, change the spring version to any 3.0.x version, or perform a request to http://www.google.com/ig/calculator?q=1USD=?EUR from a browser. The response is {lhs: "1 U.S. dollar",rhs: "0.774833411 Euros",error: "",icc: true}


Affects: 3.1 RC1, 3.1.2

Attachments:

Issue Links:

Referenced from: commits 0721146, 88906d2

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions