Apache9 commented on a change in pull request #3251:
URL: https://github.com/apache/hbase/pull/3251#discussion_r631019650



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
##########
@@ -964,8 +965,7 @@ public static HRegionInfo parseFrom(final DataInputStream 
in) throws IOException
     }
 
     //assumption: if Writable serialization, it should be longer than pblen.
-    int read = in.read(pbuf);
-    if (read != pblen) throw new IOException("read=" + read + ", wanted=" + 
pblen);
+    IOUtils.readFully(in, pbuf, 0, pblen);

Review comment:
       DataInputStream has a readFully method, so I think here we could just 
use that one?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to