We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08a858b commit 6d6705aCopy full SHA for 6d6705a
okhttp/src/main/java/io/grpc/okhttp/OkHttpWritableBufferAllocator.java
@@ -44,7 +44,8 @@ class OkHttpWritableBufferAllocator implements WritableBufferAllocator {
44
@Override
45
public WritableBuffer allocate(int capacityHint) {
46
// okio buffer uses fixed size Segments, round capacityHint up
47
- return new OkHttpWritableBuffer(new Buffer(),
48
- Math.min(MAX_BUFFER, (capacityHint + Segment.SIZE - 1) / Segment.SIZE * Segment.SIZE));
+ capacityHint = Math.min(MAX_BUFFER,
+ (capacityHint + Segment.SIZE - 1) / Segment.SIZE * Segment.SIZE);
49
+ return new OkHttpWritableBuffer(new Buffer(), capacityHint);
50
}
51
0 commit comments