lianetm commented on code in PR #22843:
URL: https://github.com/apache/kafka/pull/22843#discussion_r3761895669
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/ChunkedByteBufferOutputStream.java:
##########
@@ -310,26 +309,26 @@ public int remaining() {
return total;
}
- @Override
- public int limit() {
- ensureNotDeallocated();
- return Integer.MAX_VALUE;
- }
-
@Override
public int initialCapacity() {
ensureNotDeallocated();
return chunkSize;
}
- @Override
- public void ensureRemaining(int remainingBytesRequired) {
+ /**
+ * Throws if {@code requiredBytes} cannot be written to this stream.
+ * This only checks the attached chunks, it does not make room.
+ *
+ * @throws IllegalStateException if the attached chunks have less free
space than required
+ */
+ public void throwIfInsufficientRemaining(int requiredBytes) {
Review Comment:
done (along with a couple more that only needed package level)
--
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]