You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by br...@apache.org on 2009/11/04 01:30:11 UTC

svn commit: r832633 - /incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java

Author: bryanduxbury
Date: Wed Nov  4 00:30:10 2009
New Revision: 832633

URL: http://svn.apache.org/viewvc?rev=832633&view=rev
Log:
THRIFT-620. java: Compact Protocol should call readAll, not read
This patch switches to calling readAll instead of read.

Modified:
    incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java

Modified: incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java?rev=832633&r1=832632&r2=832633&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java (original)
+++ incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java Wed Nov  4 00:30:10 2009
@@ -554,7 +554,7 @@
    * Read a single byte off the wire. Nothing interesting here.
    */
   public byte readByte() throws TException {
-    trans_.read(byteRawBuf, 0, 1);
+    trans_.readAll(byteRawBuf, 0, 1);
     return byteRawBuf[0];
   }
 
@@ -584,7 +584,7 @@
    */
   public double readDouble() throws TException {
     byte[] longBits = new byte[8];
-    trans_.read(longBits, 0, 8);
+    trans_.readAll(longBits, 0, 8);
     return Double.longBitsToDouble(bytesToLong(longBits));
   }
 
@@ -607,7 +607,7 @@
     if (length == 0) return new byte[0];
 
     byte[] buf = new byte[length];
-    trans_.read(buf, 0, length);
+    trans_.readAll(buf, 0, length);
     return buf;
   }