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 2e487cd..b9167d2 100644
--- a/lib/java/src/protocol/TBinaryProtocol.java
+++ b/lib/java/src/protocol/TBinaryProtocol.java
@@ -185,7 +185,7 @@
       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 {