Skip to content

Commit d11b421

Browse files
committed
defautl method for tests
1 parent 6f04325 commit d11b421

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/java/io/grpc/internal/WritableBufferAllocator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ public interface WritableBufferAllocator {
3232
* Request a new {@link WritableBuffer} with the given {@code capacityHint}. This method is
3333
* similar to {@link #allocate(int)}, but there is no need to allocate greater capacity.
3434
*/
35-
WritableBuffer allocateKnownLength(int capacityHint);
35+
default WritableBuffer allocateKnownLength(int capacityHint) {
36+
return allocate(capacityHint);
37+
}
3638
}

0 commit comments

Comments
 (0)