You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2008/12/18 02:24:44 UTC

[jira] Updated: (THRIFT-235) Compiler turns default value of 0.0 into 0 in generated code, defeating autoboxing

     [ https://issues.apache.org/jira/browse/THRIFT-235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury updated THRIFT-235:
---------------------------------

    Attachment: thrift-235.patch

Untested, but I think this will do the trick.

> Compiler turns default value of 0.0 into 0 in generated code, defeating autoboxing
> ----------------------------------------------------------------------------------
>
>                 Key: THRIFT-235
>                 URL: https://issues.apache.org/jira/browse/THRIFT-235
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>            Reporter: Bryan Duxbury
>         Attachments: thrift-235.patch
>
>
> If you try to make a collection of doubles (map, set, list) that contains 0.0 by default, the compiler turns the 0.0 into 0 at some point, and then puts the 0 in the code for adding to the collection. As a result, the java compiler doesn't know how to autobox it, and it can't compile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.