THRIFT-223 Validate method should check that enum types are assigned valid values
authorBryan Duxbury <bryanduxbury@apache.org>
Tue, 20 Jan 2009 01:54:14 +0000 (01:54 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Tue, 20 Jan 2009 01:54:14 +0000 (01:54 +0000)
commit8bbd8447b9de8a31ce50e6611d8f513d281897a3
tree8f2206f458368c51737221058dae8a8045b256ab
parent46b77c4be6c0cbd336f4e4501b9722de6ce25666
THRIFT-223 Validate method should check that enum types are assigned valid values

Enum classes now get a VALID_VALUES Set that contains all of the acceptable values. Structs' validate() method has been extended to compare an enum field's value to the valid value set, but only if the __isset flag for that field is true, meaning that non-beans generated code will not perform this validity check unless the __isset flag is manually maintained.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@735910 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_java_generator.cc