THRIFT-142. java: Better handling of required fields
authorDavid Reiss <dreiss@apache.org>
Fri, 21 Nov 2008 21:55:52 +0000 (21:55 +0000)
committerDavid Reiss <dreiss@apache.org>
Fri, 21 Nov 2008 21:55:52 +0000 (21:55 +0000)
commitfd71808e35af5ba82a29320abfcbc30ef7fc6b87
tree3ac913335ba84233283aafd2291f397abf541b64
parente31b77e90e54709dfb0020cd5fe468c0998d6d81
THRIFT-142. java: Better handling of required fields

- On reading, behave the same way as the C++ code:
  throw an exception if a required field is missing.
- In addition, throw an exception if a required field is missing
  when writing.  For the JavaBeans code, this means that __isset
  is false (because it is maintained automatically).  For non-beans
  code, this means that the field is null.  Non-nullable fields are
  not checked in non-beans code.

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