Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-815

Deserialization of lists is critically broken.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.4
    • Fix Version/s: 0.4
    • Component/s: JavaScript - Compiler
    • Labels:
      None

      Description

      Edit the test code that comes with the js language target:

      var list = [1,2,3];
      var ret = client.testList(list);
      debugger;

      ret comes back as [3,3,3] when it should be echoed back as [1,2,3]
      The test case never caught this because it only verified the size, and not the contents of the returned array.
      I cannot find an immediate workaround, but I will try wrapping it in a dummy type like ListServiceResponse.

        Attachments

        1. 813-1.patch
          1 kB
          T Jake Luciani
        2. test.html
          8 kB
          Roger Meier
        3. THRIFT_815_TestFramework_test.html_json2.patch
          30 kB
          Roger Meier
        4. THRIFT-815_thrift.js.patch
          1 kB
          Roger Meier

          Activity

            People

            • Assignee:
              tjake T Jake Luciani
              Reporter:
              jordo Jordan
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: