From d4e2514c90cf6783fe4bb80c7bbd5560422ac284 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 1 Sep 2024 23:00:38 -0400 Subject: [PATCH] AVRO-4051: Remove superfluous increments --- .../avro/src/main/java/org/apache/avro/io/BinaryDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java b/lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java index 7217be3addd..665cfa60a8c 100644 --- a/lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java +++ b/lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java @@ -256,7 +256,7 @@ public float readFloat() throws IOException { ensureBounds(4); int len = 1; int n = (buf[pos] & 0xff) | ((buf[pos + len++] & 0xff) << 8) | ((buf[pos + len++] & 0xff) << 16) - | ((buf[pos + len++] & 0xff) << 24); + | ((buf[pos + len] & 0xff) << 24); if ((pos + 4) > limit) { throw new EOFException(); } @@ -271,7 +271,7 @@ public double readDouble() throws IOException { int n1 = (buf[pos] & 0xff) | ((buf[pos + len++] & 0xff) << 8) | ((buf[pos + len++] & 0xff) << 16) | ((buf[pos + len++] & 0xff) << 24); int n2 = (buf[pos + len++] & 0xff) | ((buf[pos + len++] & 0xff) << 8) | ((buf[pos + len++] & 0xff) << 16) - | ((buf[pos + len++] & 0xff) << 24); + | ((buf[pos + len] & 0xff) << 24); if ((pos + 8) > limit) { throw new EOFException(); }