THRIFT-1101. java: bytebuffer length calculation in TBinaryProtocol writeBinary
authorBryan Duxbury <bryanduxbury@apache.org>
Mon, 21 Mar 2011 18:18:33 +0000 (18:18 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Mon, 21 Mar 2011 18:18:33 +0000 (18:18 +0000)
commit177b52ab58d87450042e62a9ae6e563b528ec3c5
tree36668987642b600050dceae9b0abff5379caad3e
parentd3fceb02d450f415088c254ca5fb65d2f32085c0
THRIFT-1101. java: bytebuffer length calculation in TBinaryProtocol writeBinary

This patch fixes a bug in Binary and Compact protocol that incorrectly calculates the length of the bytes to be written when the byte buffer being written has a nonzero array offset (such as after a slice() call).

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1083890 13f79535-47bb-0310-9956-ffa450edef68
lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java
lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java
lib/java/test/org/apache/thrift/protocol/ProtocolTestBase.java