Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I compiled the Cassandra interface using thrift --gen java:beans,hashcode,nocamel. When I call the "insert" method on the Cassandra definition, I get the error:
Caused by: org.apache.thrift.protocol.TProtocolException: Required field 'timestamp' is unset!
Timestamp is of type "i64" in the service definition. Since "insert_args" for the insert method is compiled using beans and validation, it is checking the isset bitvector to see if "timestamp" is set.
However, the insert method doesn't use set_timsetamp and instead says "args.timestamp = timestamp;". This fails to set the isset for timestamp in the bitvector.
The bug only appears for primitive types because those are the only types that use the isset bitvector.