You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "belugabehr (via GitHub)" <gi...@apache.org> on 2024/09/01 03:40:52 UTC

Re: [PR] AVRO-4048: Ignore negative return values for InputStream skip [avro]

belugabehr commented on code in PR #3130:
URL: https://github.com/apache/avro/pull/3130#discussion_r1739967345


##########
lang/java/avro/src/main/java/org/apache/avro/io/DirectBinaryDecoder.java:
##########
@@ -163,7 +163,7 @@ public ByteBuffer readBytes(ByteBuffer old) throws IOException {
   protected void doSkipBytes(long length) throws IOException {
     while (length > 0) {
       long n = in.skip(length);
-      if (n <= 0) {
+      if (n == 0) {

Review Comment:
   Notice this code does not bother with the double-zero check. This can be fixed as part of another PR if need by.



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

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org