Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Brooks committed Jun 27, 2023
1 parent 9995c1a commit 71a9f8d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.elasticsearch.common.io.stream.FilterStreamInput;
import org.elasticsearch.common.io.stream.StreamInput;

import java.io.EOFException;
import java.io.IOException;
import java.util.zip.CRC32;
import java.util.zip.Checksum;
Expand Down Expand Up @@ -102,11 +101,12 @@ public void reset() throws IOException {

@Override
public int read() throws IOException {
try {
return readByte() & 0xFF;
} catch (EOFException e) {
return -1;
int b = delegate.read();
if (b == -1) {
return b;
}
digest.update((byte) b);
return b;
}

@Override
Expand Down

0 comments on commit 71a9f8d

Please sign in to comment.