From: David Reiss Date: Mon, 17 Dec 2007 09:49:10 +0000 (+0000) Subject: Thrift: Fix a bug in the Java runtime. X-Git-Tag: 0.2.0~1076 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=5ddd2f13faa12c5a45ebafcb229c570031678a78;p=common%2Fthrift.git Thrift: Fix a bug in the Java runtime. Reviewed By: mcslee Test Plan: Looked at the C++ version side-by-side. Revert Plan: ok git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665396 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/java/src/protocol/TBinaryProtocol.java b/lib/java/src/protocol/TBinaryProtocol.java index 2e487cdd..b9167d24 100644 --- a/lib/java/src/protocol/TBinaryProtocol.java +++ b/lib/java/src/protocol/TBinaryProtocol.java @@ -185,7 +185,7 @@ public class TBinaryProtocol extends TProtocol { if (version != VERSION_1) { throw new TProtocolException(TProtocolException.BAD_VERSION, "Bad version in readMessageBegin"); } - message.type = (byte)(version & 0x000000ff); + message.type = (byte)(size & 0x000000ff); message.name = readString(); message.seqid = readI32(); } else {