Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
Patch Available
Description
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.