diff --git a/src/main/java/it/cavallium/dbengine/database/LLUtils.java b/src/main/java/it/cavallium/dbengine/database/LLUtils.java index 7c3a1d1..5b572ff 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLUtils.java +++ b/src/main/java/it/cavallium/dbengine/database/LLUtils.java @@ -479,10 +479,14 @@ public class LLUtils { } public static Send empty(BufferAllocator allocator) { - try (var empty = CompositeBuffer.compose(allocator)) { - assert empty.readableBytes() == 0; - assert empty.capacity() == 0; - return empty.send(); + 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(); + } } }