Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9832

Erroneous "0" returned where empty string expected in call through the RestTemplate

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.1 RC1, 3.1.2
    • Fix Version/s: 3.1.3, 3.2 RC1
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      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}

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                Reporter:
                matsev Mattias Severson
                Last updater:
                Rossen Stoyanchev
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 49 weeks, 1 day ago