[ 
https://issues.apache.org/jira/browse/THRIFT-1321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107349#comment-13107349
 ] 

Anthony Molinaro commented on THRIFT-1321:
------------------------------------------

I see how that could be the case, but I'd like to reproduce this error with a 
simple case, starting with a thrift definition and doing serialize/deserialize 
(like in the snippet I included before).  I used binary values in the snippet 
and things seemed to work, so I'm still not certain how this manifests itself.

Do you have a test which shows the bug happening?  Otherwise I can try to 
figure out a way to reproduce it sometime soon.

> Map serialization is broken in the Erlang library
> -------------------------------------------------
>
>                 Key: THRIFT-1321
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1321
>             Project: Thrift
>          Issue Type: Bug
>          Components: Erlang - Library
>    Affects Versions: 0.7
>            Reporter: Louis-Philippe Gauthier
>         Attachments: bug.diff
>
>
> dict:fold/3 always return ValData as a list and therefore breaks the pattern 
> matching (guards).
> {quote}
> Dict = dict:new(),
> Dict2 = dict:append("key1", "value1", Dict),
> Dict3 = dict:append("key2", [1,2,3], Dict2),
> Dict4 = dict:append("key3", <<"value3">>, Dict3),
> dict:fold(fun(Key, Value, AccIn) -> io:format("~p : ~p~n", [Key, Value]) end, 
> [], Dict4).
> "key1" : ["value1"]
> "key2" : [[1,2,3]]
> "key3" : [<<"value3">>]
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to