THRIFT-1529. java: TupleProtocol can unintentionally include an extra byte in bit...
authorBryan Duxbury <bryanduxbury@apache.org>
Thu, 1 Mar 2012 23:41:09 +0000 (23:41 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Thu, 1 Mar 2012 23:41:09 +0000 (23:41 +0000)
commit38087708b5ca5a575bb3bcbbf3c24ab181e1cfc1
tree2057059de4427c7e55a0043eeb7a354d1ad31f88
parent9be7b3886027509c8c68f79fd8ac60c0005d09e2
THRIFT-1529. java: TupleProtocol can unintentionally include an extra byte in bit vectors when number of optional fields is an integral of 8

This patch harmonizes the math between writeBitSet and readBitSet to eliminate the mismatch in number of bytes calculation, allowing structs to be serialized correctly.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1295995 13f79535-47bb-0310-9956-ffa450edef68
lib/java/src/org/apache/thrift/protocol/TTupleProtocol.java