adoroszlai commented on code in PR #6690:
URL: https://github.com/apache/ozone/pull/6690#discussion_r1608536991
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/ChunkBufferImplWithByteBuffer.java:
##########
@@ -34,14 +36,24 @@
final class ChunkBufferImplWithByteBuffer implements ChunkBuffer {
private final ByteBuffer buffer;
private final UncheckedAutoCloseable underlying;
+ private final Consumer<Integer> releaseCallback;
ChunkBufferImplWithByteBuffer(ByteBuffer buffer) {
- this(buffer, null);
+ this.buffer = Objects.requireNonNull(buffer, "buffer == null");
+ this.releaseCallback = null;
+ this.underlying = null;
+ }
+
+ ChunkBufferImplWithByteBuffer(ByteBuffer buffer, Consumer<Integer>
releaseFunction) {
Review Comment:
Nit: use `IntConsumer` instead of `Consumer<Integer>`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]