Thrift: Fix a bug in the Java runtime.
authorDavid Reiss <dreiss@apache.org>
Mon, 17 Dec 2007 09:49:10 +0000 (09:49 +0000)
committerDavid Reiss <dreiss@apache.org>
Mon, 17 Dec 2007 09:49:10 +0000 (09:49 +0000)
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

lib/java/src/protocol/TBinaryProtocol.java

index 2e487cd..b9167d2 100644 (file)
@@ -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 {