Hi Sid,
there has been some discussion around this topic and there are also some
JIRA tickets that deal with this matter. I don't have them at hand right
now, but searching the mail archives and having a look at
https://issues.apache.org/jira/browse/THRIFT-1469 could be a good start.
The intended way to indicate presence of an optional field are the __isset
flags. These flags are usually generated for optional fields only.
Have fun,
JensG
-----Ursprüngliche Nachricht-----
From: Sid Golestane
Sent: Tuesday, January 1, 2013 2:28 AM
To: [email protected]
Subject: Distinguish null vs unspecified value in java
Hi,
Per section 5.2 of thrift white paper "When an expected field is not
found, there must be
some way to signal to the developer that it was not present".
Considering the above, I was wondering if there is anyway to
distinguish null vs an unspecified value in java? As far as I can tell
current implementation treats both as null which mean we can't add any
new nillable field without breaking forward compatibility.
Thanks,
-Sid