Skip to content

Commit

Permalink
Compile with Java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfjack committed Nov 21, 2023
1 parent ea7981c commit e7e9536
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/io/grpc/internal/Base64Deframer.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void request(int numMessages) {
@Override
public void deframe(ReadableBuffer data) {
// TODO: Make this more efficient.
try (data) {
try {
int fill = Math.min(4 - bufferedBytes, data.readableBytes());
data.readBytes(buffer, bufferedBytes, fill);
bufferedBytes += fill;
Expand All @@ -79,6 +79,8 @@ public void deframe(ReadableBuffer data) {
delegate.deframe(ReadableBuffers.wrap(decoded));
bufferedBytes = data.readableBytes();
data.readBytes(buffer, 0, bufferedBytes);
} finally {
data.close();
}
}

Expand Down

0 comments on commit e7e9536

Please sign in to comment.