toddlipcon commented on a change in pull request #597: HDFS-3246: pRead 
equivalent for direct read path
URL: https://github.com/apache/hadoop/pull/597#discussion_r273624528
 
 

 ##########
 File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
 ##########
 @@ -327,7 +329,7 @@ public void close() throws IOException {
   public int read(long position, byte[] buffer, int offset, int length)
       throws IOException {
     checkStream();
-    try {
+    if (in instanceof PositionedReadable) {
 
 Review comment:
   nit: do you mind negating this check so that you can un-indent the rest of 
the method? ("early return" style)

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to