I believe it is not currently implemented in Java, though talk has come up of making that happen.
I agree that it makes sense to also catch this error on the client side when serializing. There's only one sort-of-weird edge case, though. If you're using an updated client to contact an out-of-date server, and the required field has been recently added, it's possible that the required field isn't strictly necessary for the old server to do its job. This case won't be exploitable if we make this change. However, I still think we should do it -- this example is stupid, because you shouldn't mark a field as required if you still intend on making calls without it. mcslee -----Original Message----- From: Bryan Duxbury [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2008 10:35 AM To: [email protected] Subject: Required fields Correct me if I'm wrong, but when you specify a field of a struct is "required", that means if you attempt to deserialize a record and it doesn't contain the required field, it should throw an exception. If this is the behavior, then shouldn't we also throw an exception when serializing and the field is not present? Also, I can't seem to see where in the Java implementation the "required" reading behavior is implemented. Am I missing something obvious, or is it just not implemented in Java? -Bryan
