openinx commented on a change in pull request #479: HBASE-22802 Avoid temp 
ByteBuffer allocation in FileIOEngine#read
URL: https://github.com/apache/hbase/pull/479#discussion_r314965031
 
 

 ##########
 File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java
 ##########
 @@ -53,6 +55,22 @@
   private int markedItemIndex = -1;
   private final int[] itemBeginPos;
 
+  private Iterator<ByteBuffer> buffsIterator = new Iterator<ByteBuffer>() {
+    @Override
+    public boolean hasNext() {
+      return curItemIndex < limitedItemIndex ||
+          (curItemIndex == limitedItemIndex && 
items[curItemIndex].hasRemaining());
+    }
+
+    @Override
+    
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="IT_NO_SUCH_ELEMENT",
 
 Review comment:
   I think here  can throw the NoSuchElementException  if curItemIndex exceed ? 

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


With regards,
Apache Git Services

Reply via email to