You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2009/08/14 17:35:16 UTC

[jira] Updated: (THRIFT-562) Java is inconsistent checking for required fields

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

Jonathan Ellis updated THRIFT-562:
----------------------------------

    Attachment: 562.patch

> Java is inconsistent checking for required fields
> -------------------------------------------------
>
>                 Key: THRIFT-562
>                 URL: https://issues.apache.org/jira/browse/THRIFT-562
>             Project: Thrift
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>         Attachments: 562.patch
>
>
> In several places, the java generator does things like
>     // Most existing Thrift code does not use isset or optional/required,
>     // so we treat "default" fields as required.
>     bool is_optional = (*m_iter)->get_req() == t_field::T_OPTIONAL;
> but it doesn't do so consistently.  This replaces the remaining == REQUIRED checks with != OPTIONAL to also include fields in the DEFAULT state.

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