[ 
https://issues.apache.org/jira/browse/HDFS-15042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744708#comment-17744708
 ] 

ASF GitHub Bot commented on HDFS-15042:
---------------------------------------

steveloughran commented on code in PR #1747:
URL: https://github.com/apache/hadoop/pull/1747#discussion_r1268334625


##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java:
##########
@@ -1684,6 +1685,9 @@ public int read(long position, final ByteBuffer buf) 
throws IOException {
   @Override
   public void readFully(long position, final ByteBuffer buf)
       throws IOException {
+    if (position < 0) {
+      throw new EOFException(NEGATIVE_POSITION_READ);
+    }

Review Comment:
   ok





> Add more tests for ByteBufferPositionedReadable 
> ------------------------------------------------
>
>                 Key: HDFS-15042
>                 URL: https://issues.apache.org/jira/browse/HDFS-15042
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: fs, test
>    Affects Versions: 3.3.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> There's a few corner cases of ByteBufferPositionedReadable which need to be 
> tested, mainly illegal read positions. Add them



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to