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 2010/02/22 23:50:28 UTC
[jira] Assigned: (THRIFT-713) Java compareTo method throws NPE when
any field isn't set.
[ https://issues.apache.org/jira/browse/THRIFT-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury reassigned THRIFT-713:
------------------------------------
Assignee: Bryan Duxbury
> Java compareTo method throws NPE when any field isn't set.
> ----------------------------------------------------------
>
> Key: THRIFT-713
> URL: https://issues.apache.org/jira/browse/THRIFT-713
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (Java)
> Reporter: Dmitry Chechik
> Assignee: Bryan Duxbury
> Attachments: thrift-713.patch
>
>
> On line 1395 of t_java_generator.cc, the code is:
> indent(out) << "lastComparison = Boolean.valueOf(" << generate_isset_check(field) << ").compareTo(" << generate_isset_check(field) << ");" << endl;
> So isSet*() of the object being compared is just compared to the same object. This throws a NPE if the field isn't set.
> I've attached a fix patch.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.