Temporary

This commit is contained in:
Andrea Cavalli 2021-09-23 15:48:27 +02:00
parent 51ec85abe1
commit 247207febe

View File

@ -479,12 +479,16 @@ public class LLUtils {
}
public static Send<Buffer> empty(BufferAllocator allocator) {
try {
return allocator.allocate(0).send();
} catch (Exception ex) {
try (var empty = CompositeBuffer.compose(allocator)) {
assert empty.readableBytes() == 0;
assert empty.capacity() == 0;
return empty.send();
}
}
}
public static Send<Buffer> copy(BufferAllocator allocator, Buffer buf) {
if (CompositeBuffer.isComposite(buf) && buf.capacity() == 0) {