Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
0.5
-
None
-
None
-
Mac
Description
I have thrift:
const i16 CURRENT_VERSION = 10;
struct SomeMsg {
1: optional i16 currentVersion = CURRENT_VERSION;
}
Now, when the follow test will fail:
SomeMsg msg = new SomeMsg(); assertEquals(Constants.CURRENT_VESRION, msg.getCurrentVersion()); // pass assertTrue(msg.isSetCurrentVersion()); // fail.
Question is: is this behavior by design?
Attachments
Issue Links
- duplicates
-
THRIFT-1827 Inconsistent behavior in isSet mechanism
- Open
-
THRIFT-1394 Treatment of optional fields is not consistent between C++ and Java
- Closed