Github user greghogan commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3595#discussion_r108437565
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/core/memory/ByteArrayInputStreamWithPos.java
 ---
    @@ -118,7 +118,8 @@ public int getPosition() {
                return position;
        }
     
    -   public void setPos(int pos) {
    +   public void setPosition(int pos) {
    +           Preconditions.checkArgument(pos < count, "Position out of 
bounds.");
    --- End diff --
    
    Allow for equality as with `ByteArrayOutputStreamWithPos`? And check for 
non-negative. Should we create a matching `getEndPosition()` as in 
`ByteArrayOutputStreamWithPos`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to