Ojasvi-Jalal commented on a change in pull request #2698:
URL: https://github.com/apache/hadoop/pull/2698#discussion_r585426598



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java
##########
@@ -542,7 +542,7 @@ public synchronized void seek(long n) throws IOException {
     if (n < 0) {
       throw new EOFException(FSExceptionMessages.NEGATIVE_SEEK);
     }
-    if (n > contentLength) {
+    if (n > 0 && n >= contentLength) {
       throw new EOFException(FSExceptionMessages.CANNOT_SEEK_PAST_EOF);

Review comment:
       what about when n == 0? also, isn't n>0 unnecessary as it should be 
implied if the if condition at line 542 is false? 




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to